BioPerl-Run
view release on metacpan or search on metacpan
lib/Bio/DB/SoapEUtilities/FetchAdaptor/seq.pm view on Meta::CPAN
# parse out organelle, common name, abbreviated name if present;
# this should catch everything, but falls back to
# entire GBSeq_taxonomy element just in case
if ($get->('source') =~ m{^
(mitochondrion|chloroplast|plastid)?
\s*(.*?)
\s*(?: \( (.*?) \) )?\.?
$}xms ) {
($organelle, $abbr_name, $common) = ($1, $2, $3); # optional
} else {
$abbr_name = $get->('source'); # nothing caught; this is a backup!
}
# Convert data in classification lines into classification array.
my @class = split(/; /, $get->('taxonomy'));
# do we have a genus?
my $possible_genus = quotemeta($class[-1])
. ($class[-2] ? "|" . quotemeta($class[-2]) : '');
if ($sci_name =~ /^($possible_genus)/) {
$genus = $1;
lib/Bio/DB/SoapEUtilities/FetchAdaptor/species.pm view on Meta::CPAN
# parse out organelle, common name, abbreviated name if present;
# this should catch everything, but falls back to
# entire GBSeq_taxonomy element just in case
# if ($get->('source') =~ m{^
# (mitochondrion|chloroplast|plastid)?
# \s*(.*?)
# \s*(?: \( (.*?) \) )?\.?
# $}xms ) {
# ($organelle, $abbr_name, $common) = ($1, $2, $3); # optional
# } else {
# $abbr_name = $get->('source'); # nothing caught; this is a backup!
# }
# # Convert data in classification lines into classification array.
my @class = split(/; /, $get->('Lineage'));
# do we have a genus?
my $possible_genus = quotemeta($class[-1])
. ($class[-2] ? "|" . quotemeta($class[-2]) : '');
if ($sci_name =~ /^($possible_genus)/) {
$genus = $1;
( run in 0.586 second using v1.01-cache-2.11-cpan-49f99fa48dc )