Browse Source

made it recognize first stop codon

main
Ravi Shah 5 years ago
parent
commit
32e4019b48
  1. 10
      converter.py

10
converter.py

@ -33,18 +33,18 @@ def find_start(mrna):
quit()
def find_stop(mrna):
if "UAA" in mrna:
for i in mrna:
if "UAA" in i:
print("UAA STOP codon found")
stop_index = mrna.index("UAA")
elif "UAG" in mrna:
elif "UAG" in i:
print("UAG STOP codon found")
stop_index = mrna.index("UAG")
elif "UGA" in mrna:
elif "UGA" in i:
print("UGA STOP codon found")
stop_index = mrna.index("UGA")
else:
print("No STOP codon found. Exiting...")
quit()
continue
return stop_index
def break_into_codons(mrna):

Loading…
Cancel
Save