[Bioperl-l] Local flat file implementation of Bio::DB::Taxonomy
Brian Osborne
osborne1 at optonline.net
Tue Feb 21 14:46:56 UTC 2006
Gabriel,
I don't think so, this works:
#!/usr/bin/perl -w
use strict;
use lib "/Users/bosborne/bioperl-live";
use Bio::DB::Taxonomy;
my $nodesfile = "nodes.dmp";
my $namefile = "names.dmp";
my $db = new Bio::DB::Taxonomy(-source => 'flatfile',
-nodesfile => $nodesfile,
-namesfile => $namefile);
my $taxonid = $db->get_taxonid('Homo sapiens');
my $node = $db->get_Taxonomy_Node(-taxonid => $taxonid);
# Here, $taxonid is 9606. However,
my $parent = $node->get_Parent_Node;
# is alright, but access to the children nodes via
my @childrenids = $db->get_Children_Taxids($taxonid);
print "@childrenids";
What Bioperl version are you using?
Brian O.
On 2/21/06 7:19 AM, "Gabriel Valiente" <valiente at lsi.upc.edu> wrote:
> my $node = $db->get_Taxonomy_Node(-taxonid => $taxonid);
More information about the Bioperl-l
mailing list