[Bioperl-l] EUtilities term handling

Chris Fields cjfields at uiuc.edu
Thu Oct 5 15:50:51 UTC 2006

> I know what it says...

Ah, that's the Sendu I know and love.

>>     * Correct: &term=biomol+mrna[properties]+AND+mouse[organism]
> The correct query is the one that has +s in it.

Yes, that's because it's a URL, not a raw search term string (it has  
been URI-encoded so spaces are converted to '+').  If you use that as  
a direct query in Entrez you will not get the same response.  You do  
get something if you use the new NCBI global query form on the main  
page, but clicking on the nucleotide or PMC hits reveals that the URL  
is malformed and no term is present.  That is exactly the same  
response in EUtilities:

<?xml version="1.0"?>
<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD eSearchResult, 11 May  
2002//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/ 

Note the QueryTranslation tag is empty.

The only noticeable difference is using egquery (which I just fixed  
in CVS yesterday).  The returned XML gives no hits for any database,  
which is true based on individual esearch queries for those database,  
and is actually more consistent than the website version.

>> 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.

If you mean that most users will actually use a URL-like search term,  
then I would say you have a point.  But that simply isn't the case.

If clarifying the docs makes it better, then so be it.

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