2
# This is a -*-Perl-* file (make my emacs happy)
6
bp_query_entrez_taxa - query Entrez taxonomy database and print out information
10
bp_query_entrez_taxa "Homo sapiens" "Saccharomyces cerevisiae" Rhizopus Metazoa
11
bp_query_entrez_taxa -gi 28800981 -gi 54301680 -db nucleotide
12
bp_query_entrez_taxa -gi 71836523 -db protein
14
Provide the genus and species name in quotes, you can also query for
15
a non-species node like Family or Order
18
-v or --verbose : print verbose debugging info
19
-gi : one or many GI numbers to lookup taxon id for
20
-db : the sequence db (nucleotide or protein) the GI is for
22
other arguments are assumed to be species names to lookup in taxonomy db
27
Jason Stajich jason-at-bioperl-dot-org
33
use Bio::DB::Taxonomy;
38
GetOptions('v|verbose' => \$verbose,
42
my $db = new Bio::DB::Taxonomy(-source => 'entrez', -verbose => $verbose);
44
my @nodes= $db->get_Taxonomy_Node(-gi => \@gi,
46
for my $node ( @nodes ) {
48
print " for gi $gi:\n";
49
print " taxonid is ",$node->ncbi_taxid,"\n";
50
print " node is ", join(", ",$node->classification), "\n";
51
print " species is ", $node->species,"\n";
52
print " parent is ", $node->parent_id, "\n";
53
print " rank is ", $node->rank, "\n";
54
print " genetic_code ", $node->genetic_code, "\n";
55
print " mito_genetic_code ", $node->mitochondrial_genetic_code, "\n";
56
print " scientfic name is ", $node->binomial, "\n";
61
for my $name ( @ARGV ) {
62
my $taxonid = $db->get_taxonid($name);
63
my $node = $db->get_Taxonomy_Node(-taxonid => $taxonid);
64
print "taxonid is $taxonid\n";
66
print " node is ", join(", ",$node->classification), "\n";
67
print " species is ", $node->species,"\n";
68
print " parent is ", $node->parent_id, "\n";
69
print " rank is ", $node->rank, "\n";
70
print " genetic_code ", $node->genetic_code, "\n";
71
print " mito_genetic_code ", $node->mitochondrial_genetic_code, "\n";
72
print " scientfic name is ", $node->binomial, "\n";
73
print " common name is ", $node->common_name, "\n";
74
print " create date is ", $node->create_date, "\n";
75
print " update date is ", $node->update_date, "\n";
76
print " pub date is ", ($node->pub_date || ''), "\n";
77
print " variant is ", $node->variant, "\n";
78
print " sub_species is ", $node->sub_species, "\n";
79
print " organelle is ", $node->organelle, "\n";
80
print " division is ", $node->division, "\n";