Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

feberhardt
Copy link

I completed mini project1. It was awesome!

Copy link

@SeunginLyu SeunginLyu left a 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

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'

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

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

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)

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants