[Biopython-dev] NCBI Abuse activity with Biopython

Andrew Dalke dalke at dalkescientific.com
Thu Jun 26 21:40:51 UTC 2008


On Jun 26, 2008, at 7:04 PM, Peter wrote:
> I started working on a patch to mark Bio.GenBank.search_for() etc as
> deprecated, but on reflection I don't really like the longer code
> needed with Bio.Entrez

> One idea that might be worth discussing is having variations of the
> Entrez.e* functions which will parse the XML and return the results.
> i.e. something like this:
>
> def esearch2(...) :
>    """Calls ESearch and parses the returned XML."""
>    return read(esearch(..., retmode="XML"))

What about calling it "search"?  That is, the one that does  
everything the default way as most people expect is the one which  
doesn't need the prefix?

> My initial plan was to get the search results back as plain text
> (retmode='uilist'), thus avoiding parsing the XML.  However, after
> reading the Entrez documentation, and some experimentation to confirm
> this, I was surprised to find the ESearch will only return XML.  The
> NCBI appear to suggest that if you want your search results in another
> format use the WebEnv session history, and then ask EFetch to reformat
> it (!).  This does work, but means making two internet calls:

That's my memory of it too.

> As an aside, do we really have to include the database in the  
> efetch call above?

Yes.  Or you did 5 years ago.

				Andrew
				dalke at dalkescientific.com





More information about the Biopython-dev mailing list