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

Jason Stajich jason.stajich at duke.edu
Tue Feb 21 14:51:39 UTC 2006


of course it should, and it does support this.  Children query  
definitely exists for the flatfile implementation I don't understand  
why are you getting entrez errors when you are requesting the  
flatfile handle?
I can't investigate but it definitely worked for me to get  children  
nodes.  Did you actually try running the script that already should  
work - scripts/taxa/local_taxonomdb_query ?

You definitely can't request children nodes via the entrez  
implementation because NCBI doesn't (or didn't when this was written  
I don't know about now) provide children id access so it is pretty  
useful for that - although the eutils support may have expanded I'm  
not sure. If someone has the itch, please scratch it and work on this.

I think you need to pass in $parent instead of $taxonid to  
get_Children_Taxids -- although I guess I wrote the method to accept  
either.

-jason

On Feb 21, 2006, at 7:19 AM, Gabriel Valiente wrote:

> 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
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

--
Jason Stajich
Duke University
http://www.duke.edu/~jes12





More information about the Bioperl-l mailing list