Bio-Translator
view release on metacpan or search on metacpan
lib/Bio/Translator.pm view on Meta::CPAN
@p,
{
strand => $VAL_STRAND,
start => { %$VAL_START, default => 0 }
}
);
$codon = uc $codon;
# Set up the translation table given the strand and whether this is
# searching for stop codons. Set up the not_found string by whether this
# is a start or not.
my $rc = $p{strand} == 1 ? 0 : 1;
my ( $table, $not_found );
unless ( $p{start} ) {
$table = $self->table->codon2aa->[$rc];
$not_found = 'X';
}
else {
$table = $self->table->codon2start->[$rc];
$not_found = '-';
}
return $self->table->_unroll( $codon, $table, { start => $p{start} } )
|| $not_found;
}
1;
=head1 AUTHOR
Kevin Galinsky, C<kgalinsky plus cpan at gmail dot com>
=head1 BUGS
( run in 1.200 second using v1.01-cache-2.11-cpan-0a987023a57 )