Bio-MUST-Core
view release on metacpan or search on metacpan
lib/Bio/MUST/Core/GeneticCode/Factory.pm view on Meta::CPAN
# ...
# }
my %code_for;
for my $code (@codes) {
# get all names and id for current code
my ($id) = $code =~ m/ id \s* (\d+) /xms;
my @names = $code =~ m/ name \s* \"(.*?)\" /xmsg;
@names = map { s{\n}{}xmsgr } @names; # remove newline chars
@names = map { split m{;\s*}xms } @names; # demultiplex names
# retrieve the amino acid line
my ($aa_line) = $code =~ m/ ncbieaa \s* \"(.*?)\" /xms;
$aa_line =~ s{\*}{x}xmsg; # make STOPs MUST-compliant
# retrieve the three codon lines
my ($b1_line) = $code =~ m/ Base1 \s* ([TACG]+) /xms;
my ($b2_line) = $code =~ m/ Base2 \s* ([TACG]+) /xms;
my ($b3_line) = $code =~ m/ Base3 \s* ([TACG]+) /xms;
( run in 0.804 second using v1.01-cache-2.11-cpan-71847e10f99 )