Translation of Codons into amino acid sequence
2
0
Entering edit mode
9.0 years ago
codon={'UUU':'Phe','UUC':'Phe','uua':'Leu','UUG':'Leu','CUU':'Leu','CUC':'Leu','CUA':'Leu','CUG':'Leu','AUU':'Ile','AUC':'Ile','AUA':'Ile','AUG':'Met','GUU':'Val','GUC':'Val','GUA':'Val','GUG':'Val','UCU':'Ser','UCC':'Ser','UCA':'Ser','UCG':'Ser','CCU':'Pro','CCC':'Pro','CCA':'Pro','CCG':'Pro','ACU':'Thr','ACC':'Thr','ACA':'Thr','ACG':'Thr','GCU':'Ala','GCC':'Ala','GCA':'Ala','GCG':'Ala','UAU':'Tyr','UAC':'Tyr','UAA':'STOP','UAG':'STOP','CAU':'His','CAC':'His','CAA':'Gln','CAG':'Gln','AAU':'Asn','AAC':'Asn','AAA':'Lys','AAG':'Lys','GAU':'Asp','GAC':'Asp','GAA':'Glu','GAG':'Glu','UGU':'Cys','UGC':'Cys','UGA':'STOP','UGG':'Trp','CGU':'Arg','CGC':'Arg','CGA':'Arg','CGG':'Arg','AGU':'Ser','AGC':'Ser','AGA':'Arg','AGG':'Arg','GGU':'Gly','GGC':'Gly','GGA':'Gly','GGG':'Gly'}

Can any one help me that how to give function to translate this codon dictionary into amino acid sequence. I need help

biopython translation • 8.1k views
ADD COMMENT
1
Entering edit mode

Assignment?

ADD REPLY
0
Entering edit mode

Please, note that one of the keys in your dictionary is in lowercase, namely the 'uua' codon. You need to fix it in order for your translation code to work correctly.

ADD REPLY
0
Entering edit mode

That or you could coerce everything to upper/lowercase before the lookup. Not as efficient, but probably good enough for the scale of this homework assignment.

ADD REPLY
1
Entering edit mode
9.0 years ago
Dan D 7.4k

You already have your dictionary of codon to amino acid associations. Now you need to write a function to traverse an RNA sequence, pull out three bases at a time, and then use your dictionary to find the matching amino acid. If the codon is a STOP codon, simply returnwhat you've built without proceeding further.

One strategy would be to split your sequence into a list. Then you can iterate over that list. Have another list for your amino acids. For each codon, append that amino acid to your list. When you return from the function, simply join that amino acid list.

If Biopython has the three-letter amino acid alphabet available, you could also use it or define your own alphabet I suppose.

ADD COMMENT

Login before adding your answer.

Traffic: 1770 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6