-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completed mp1 part2 #3
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some stylistic suggestions for your code. I also recommend that you add your own unit tests to test the functions. Overall, it looks good and keep up the good work!
@@ -2,7 +2,7 @@ | |||
""" | |||
YOUR HEADER COMMENT HERE | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a short description(a.k.a header comment) here for next mini-project. It sounds pretty trivial but such documentation practice is going to help you and your team members in the long term
# Define Stop Codons | ||
stop_codons = ['TAA', 'TAG', 'TGA'] | ||
start_codon = 'ATG' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's usually recommended to put these defining statements right below the import statements because these variables are going to get referenced in many other functions that come below.
while counter_2 >= 0: | ||
reverse_complement = reverse_complement + complement_dna[counter_2] | ||
counter_2 = counter_2 - 1 | ||
return reverse_complement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going Beyond : Try using list comprehensions.
return [get_complement(c) for c in dna[::-1]]
for simple functinos like this, this one line of code is more readable than 10 lines of code that does the same thing
# TODO: implement this | ||
pass | ||
|
||
i=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is unnecessary
b = longest_ORF(a) # put it in longest_ORF | ||
ORF_noncoding.append(b) # return len as integer to list | ||
t = t + 1 | ||
longest_ORF_noncoding = max(ORF_noncoding, key=len)# Look for and return the longest ORF (same function as used above) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to think about : can you do this without saving each ORF into a list?
I completed mini project1. It was awesome!