转自 https://www.plob.org/article/4603.html
具体请去上面的网页查看。
my $DNA="ATGCCCGGT";
my $pep=&TranslateDNASeq($DNA);
sub TranslateDNASeq{
use Bio::Seq;
(my $dna)=@_;
my $seqobj=Bio::Seq->new(-seq =>$dna, -alphabet =>'dna');
return $seqobj->translate()->seq();
}