Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Alexey Morozov <alexeymorozov1991 <at> gmail.com>
Subject: GI to taxonomy
Newsgroups: gmane.comp.lang.perl.bio.general
Date: Friday 13th September 2013 08:06:09 UTC (over 3 years ago)
Dear colleagues,
I have a bunch of fasta genomes annotated only by their GI numbers, and
need to get a taxonomy for all of them. So I rewrote get_tree method from
Bio::DB::Taxonomy:

 12 open GIS, GI_FILE;
 13 my $tax_db=Bio::DB::Taxonomy->new(source=>'entrez');
 14 my $tree;
 15 while ()
 16         {
 17         print "Requesting data for GI $_\n";
 18         my $taxon=$tax_db->get_taxon(-gi=>"$_",-db=>'nucleotide');
 19         if ($@){die $@;}#Catch exception and die, just in case
 20                 # or die "Cannot get taxonomy data for GI$_:$!\n";
 21         if ($tree)
 22                 {
 23                 $tree->merge_lineage($taxon);
 24                 }else
 25                 {
 26                 $tree=Bio::Tree::Tree->new(-node=>$taxon);
 27                 }
 28         }

This (line 18) way to invoke Bio::DB::Taxonomy->get_taxon is documented and
I expect to get taxon objects. Yet all I get is


--------------------- WARNING ---------------------
MSG: Must have provided a valid HASHref for -params
---------------------------------------------------
Requesting data for GI 15604717


------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Can't query website: 400 URL must be absolute
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/share/perl5/Bio/Root/Root.pm:472
STACK: Bio::DB::Taxonomy::entrez::get_taxon
/usr/share/perl5/Bio/DB/Taxonomy/entrez.pm:247
STACK: ./get_tax:18
-----------------------------------------------------------

Directly using Bio::DB::Taxonomy::entrez doesn't help, GI numbers load OK,
so I have no clue what happened.
Need help.
-- 
Alexey Morozov,
LIN SB RAS, bioinformatics group.
Irkutsk, Russia.
 
CD: 3ms