[Bioperl-l] how to translate a codon to 3 letters aa code?

Marc Logghe Marc.Logghe at devgen.com
Wed Mar 19 11:55:30 EST 2003


You could do something like this:

package MyCodonTable;
use Bio::Tools::CodonTable;
@ISA = Bio::Tools::CodonTable;
use strict;

sub translate
{
  my $self = shift;
  join '', map {$Bio::Tools::CodonTable::THREELETTERSYMBOLS{$_}} split '',
$self->SUPER::translate(@_);
}

my $s = 'ACGTTGCCA';
print MyCodonTable->new->translate($s),"\n";


This should print: ThrLeuPro
Regards,
Marc



More information about the Bioperl-l mailing list