[Bioperl-l] Problem with Bio::DB::Taxonomy
cjfields at illinois.edu
Fri Aug 19 14:05:03 UTC 2011
You are likely using an old version of BioPerl (this was fixed in the latest release on CPAN I believe). Bio::DB::Taxonomy uses Bio::Taxon, so the use ofname() is incorrect; it is node_name(); if this is documented somewhere it is incorrect, so let us know where that came from.
Also, the print statement at the end isn't interpolating correctly; in general with objects I make this more explicit:
Correcting that, it works for me:
[cjfields at pyrimidine1 anjan]$ perl test.pl
On Aug 15, 2011, at 9:32 AM, ANJAN PURKAYASTHA wrote:
> I wrote a short test script for the Bio::DB::Taxonomy module:
> #!/usr/bin/perl -w
> use strict;
> use Bio::DB::Taxonomy;
> my ($nodesfile, $namesfile)= ('nodes.dmp', 'names.dmp');
> my $db= new Bio::DB::Taxonomy(-source => 'flatfile',
> -nodesfile => $nodesfile,
> -namesfile => $namesfile
> my $bacteria= $db->get_Taxonomy_Node(-taxonid => '2');
> On running this script I expect the following output: 2 Bacteria.
> Instead I get a warning:
> UNIVERSAL->import is deprecated and will be removed in a future perl at
> /usr/share/perl5/vendor_perl/Bio/Tree/TreeFunctionsI.pm line 94.
> and the following ouput:
> Bio::Taxon=HASH(0x158dbe0)->id Bio::Taxon=HASH(0x158dbe0)->name
> The script seems to be working but there seems to be a problem with
> dereferencing a Bio::Taxon object.
> Any leads on how to troubleshoot this will be much appreciated.
> Anjan Purkayastha, PhD
> Senior Computational Biologist
> TessArae LLC
> 46090 Lake Center Plaza, Suite 304
> Potomac Falls, VA 20165**
> Office- 703.444.7188 ext. 116
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
More information about the Bioperl-l