[Bioperl-l] Local flat file implementation of Bio::DB::Taxonomy

Gabriel Valiente valiente at lsi.upc.edu
Tue Feb 21 07:19:04 EST 2006


Thanks. There's still a problem with Bio::DB::Taxonomy:

use strict;
use Bio::DB::Taxonomy;

my $nodesfile = "nodes.dmp";
my $namesfile = "names.dmp";
my $db = new Bio::DB::Taxonomy(-source => 'flatfile'
                              -nodesfile => $nodesfile,
                              -namesfile => $namesfile);

my $taxonid = $db->get_taxonid('Homo sapiens');
my $node = $db->get_Taxonomy_Node(-taxonid => $taxonid); 

So far so good. Now, access to the parent node via

my $parent = $node->get_Parent_Node;

is alright, but access to the children nodes via

my @childrenids = $db->get_Children_Taxids($taxonid);

raises:

------------- EXCEPTION  -------------
MSG: Abstract method "Bio::DB::Taxonomy::get_Children_Taxids" is not
implemented by package Bio::DB::Taxonomy::entrez.
This is not your fault - author of Bio::DB::Taxonomy::entrez should be
blamed!

STACK Bio::Root::RootI::throw_not_implemented
/home/valiente/bioperl-live/Bio/Root/RootI.pm:523
STACK Bio::DB::Taxonomy::get_Children_Taxids
/home/valiente/bioperl-live/Bio/DB/Taxonomy.pm:162
STACK toplevel fetch.pl:17

Perhaps there could be a $node->get_Children_Nodes() method in
Bio::DB::Taxonomy, instead ofg relying on Bio::DB::Taxonomy::entrez.
You, know, efficient access to the children of a node is a quite
important method for almost any interesting use of the NCBI Taxonomy.

Gabriel




More information about the Bioperl-l mailing list