[Bioperl-l] EUtilities term handling
Chris Fields
cjfields at uiuc.edu
Thu Oct 5 15:59:53 UTC 2006
On Oct 5, 2006, at 10:30 AM, Sendu Bala wrote:
> Chris Fields wrote:
>>>> I use URI for building the URL with the parameters. URI
>>>> specifically encodes all of this for you, so spaces convert to
>>>> '+' and '+' converts to %2B.
>>>
>>> Well, yes. This causes what I thought of as a bug. It prevents me
>>> from submitting a /correct/ eutils term. However it isn't a bug
>>> if you explain to users they shouldn't be submitting valid eutils
>>> terms, but only valid /entrez/ terms.
>> I can specify in POD that URI encoding is in effect if that
>> placates you, and maybe add a bit about how terms are to be built
>> (based on the website). I also noticed that the esearch POD
>> doesn't have a demo in the SYNOPSIS yet (my fault).
>> However, I think this is all a bit silly. This is something most
>> people already realize and take for granted (it's standard for any
>> CGI interface to use URI encoding).
>> Also, most Entrez users do not use a term like 'BRCA2+Human
>> [ORGANISM]'. They use 'BRCA2 AND Human[ORGANISM]' or 'BRCA2 Human
>> [ORGANISM]', the latter which is implicit. All of this is on the
>> Entrez website.
>
> Exactly. You're assuming an entrez user and expecting an entrez
> query. I don't think its silly given the name of the modules for
> the user to assume the code needs an eutils query, which is a
> different thing with different behaviour /independent/ of URI
> encoding.
It's a silly distinction. The POD for Bio::DB::EUtilities states:
Bio::DB::EUtilities - interface for handling web queries and data
retrieval from NCBI's Entrez Utilities.
My question is this : why would anyone (particularly the everyday
bioperl user) want to use URL-encoded parameters for a query? That
seems to be your main argument here. If so, wouldn't I just paste
them together then send them off NCBI eutils? Would I devote ~ 10
classes to that? I could do that in a short program using an array,
join, and LWP::Simple.
The purpose is quite clearly stated, but if you feel that by
badgering me to add something to POD I consider common sense, then
you're right. You've succeeded. Bravo.
Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign
More information about the Bioperl-l
mailing list