Question: Translation of Codons into amino acid sequence
gravatar for katherinebridges99
4.5 years ago by
katherinebridges990 wrote:

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

ADD COMMENTlink modified 4.5 years ago by Dan D7.1k • written 4.5 years ago by katherinebridges990


ADD REPLYlink written 4.5 years ago by RamRS27k

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 REPLYlink written 4.5 years ago by zlira80

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 REPLYlink written 4.5 years ago by Dan D7.1k
gravatar for Dan D
4.5 years ago by
Dan D7.1k
Dan D7.1k wrote:

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 return what 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 COMMENTlink written 4.5 years ago by Dan D7.1k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2088 users visited in the last hour