[Bioperl-l] Bio::DB::Taxonomy HTTPget query problem

Hilmar Lapp hlapp at gnf.org
Thu Mar 6 18:09:04 EST 2003


Bio::DB::Taxonomy provides a programmatic interface to NCBI's taxonomy 
server. Apparently it uses Bio::Root::HTTPget to make the http request.

Here's the problem: if I run make test I get the following exception 
from Taxonomy.t:

-------------------- WARNING ---------------------
MSG: Can't query website:
------------- EXCEPTION  -------------
MSG: request failed: HTTP/1.1 502 Proxy Error
STACK Bio::Root::HTTPget::get blib/lib/Bio/Root/HTTPget.pm:155
STACK (eval) blib/lib/Bio/DB/Taxonomy/entrez.pm:207
STACK Bio::DB::Taxonomy::entrez::get_taxaid 
blib/lib/Bio/DB/Taxonomy/entrez.pm:206
STACK toplevel t/Taxonomy.t:34

--------------------------------------

The first thing is I don't use a proxy and never have. Also, the 2 
preceding queries work fine, their tests pass. Knowing our friends from 
NCBI, I put in a sleep(10) before the last query - and voila, it works 
just fine. What's apparently happening is that queries get blocked if 
there are too many (more than 2) per time unit. This needs to be 
accounted for. I also don't know whether NCBI actually provides 
instructions about how to set up your own Taxonomy server. With Biosql 
the underpinning database is soon going to be there, but you'd still 
have to write the server.

Apart from these considerations, there are actually 3 problems here:

1) The error message from HTTPget is confusing. I assume it is indeed 
the status line it gets from the HTTP server, so the problem would then 
lie there and not in HTTPget, and there's probably little we can do 
about it.

2) The line number in the stack trace is grossly wrong for HTTPget. 
Apparently the style of __PACKAGE__->throw instead of $self->throw 
yields wrong line numbers in the stack trace (maybe because comments 
are not counted?). Is there a specific reason for __PACKAGE__, or can 
it be replaced with $self? (ChrisD, Lincoln?)

3) Bio::DB::Taxonomy needs to adopt the delaying mechanism Lincoln 
implemented for the entrez query code.

If no-one volunteers to take this on, I'll submit a bug report.

	-hilmar
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------



More information about the Bioperl-l mailing list