[Bioperl-l] EUtilities term handling
hlapp at gmx.net
Thu Oct 5 13:55:58 UTC 2006
On Oct 5, 2006, at 3:19 AM, Sendu Bala wrote:
> This is actually a general question and not limited to EUtilities.
> As I
> see it EUtiltiies lets you do queries in Bioperl that you can do on a
> website. The question is, should a Bioperl module always work with
> queries that the website it is a front-end to works with?
I think yes, but stick to this definition.
Using your example, if you input 'BRCA2+9606[taxid]' on the Entrez
website it will actually not work. Hence, it should be no surprise
that it doesn't work either using Bio::DB::EUtilities.
The URL you are using to make your point is much more an example for
using a web-service (SOAP, REST, or not) than it is for using a
website. Using the web-service URL with a space in place of the '+'
works, but yields a different result (just searches for BRCA2), so if
tested for correct result the test fails.
I.e., you don't expect an input form on a website to accept URL-
encoded input. Instead, you expect it to do any URL-encoding for you
that needs to be done. Conversely, if you are using a URL to retrieve
stuff using e.g. wget or curl, it is clear that you will need to do
URL encoding yourself unless there is a command line option that lets
you instruct the querying program to do so.
I would be careful with mangling the two definitions into one,
resulting in a module that needs to serve two masters. You could
consider providing an option though that lets you turn off the URL
encoding on demand.
Aside from that, one of the advantages of having the service wrapped
in Bioperl is in fact that you can have it accept a wider variety of
parameters that the actual service would allow you to have, e.g.,
arrays, hashes, or whatever seems appropriate.
: Hilmar Lapp -:- Durham, NC -:- hlapp at gmx dot net :
More information about the Bioperl-l