Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Brian Osborne <bosborne11 <at> verizon.net>
Subject: Re: GI to taxonomy
Newsgroups: gmane.comp.lang.perl.bio.general
Date: Monday 16th September 2013 15:07:36 UTC (over 3 years ago)
Chris,

Something odd is happening, this can't be right:

161:	    $self->_initialize(@args);
162==>	    return $self;
163 	}
164 	
165 	
166 	sub _initialize {
167:	  my($self) = shift;
168 	
  DB<6> p $self->entrez_url
source

I'll look into this tonight …

BIO


On Sep 16, 2013, at 10:39 AM, "Fields, Christopher J"
 wrote:

> That's possible; there are various eutils interfaces scattered throughout
bioperl, so it's possible some haven't been updated to the most recent URL.
 Brian, does a modified URL work?
> 
> chris
> 
> On Sep 16, 2013, at 8:08 AM, Brian Osborne 
wrote:
> 
>> Chris,
>> 
>> Bio::DB::Taxonomy::entrez uses this URL by default:
>> 
>> http://www.ncbi.nih.gov/entrez/eutils/
>> 
>> Should it be using this one?
>> 
>> http://eutils.ncbi.nlm.nih.gov/entrez/eutils/
>> 
>> Brian O.
>> 
>> On Sep 13, 2013, at 4:06 AM, Alexey Morozov
 wrote:
>> 
>>> 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.
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> [email protected]
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>> 
>> 
>> _______________________________________________
>> Bioperl-l mailing list
>> [email protected]
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> [email protected]
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
 
CD: 3ms