in reply to Re: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.
in thread Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.

For future reference, perlmonks linkifies anything between [ and ], so locations in the posted code that display as links should actually be array indices or character classes. For example
if ( $_ 0 =~ / GGAGCU /i ) { return G;} # Glycine;
is printed above as

if ( $_ 0 =~ / GGAGCU /i ) { return G;} # Glycine;

and should therefore actually probably be translated as

if ( $_[0] =~ /GG[AGCU]/i ) { return G;} # Glycine;
barring ambiguities with regard to whitespace counts. Not that I've done this before....

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

  • Comment on Re^2: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.
  • Select or Download Code