[Biopython-dev] NCBI Abuse activity with Biopython
Peter
biopython at maubp.freeserve.co.uk
Fri Jun 27 16:06:58 UTC 2008
On Fri, Jun 27, 2008 at 4:54 PM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
>> Your suggestion to automatically do the parsing when XML format is
>> requested would prevent the user from parsing the XML themselves (e.g.
>> using SAX or DOM).
>
> Actually I was suggesting to do the parsing only if no format is
> requested, and to return a handle to XML if XML format is requested.
Oh I see. But determining the format is a complex combination of the
retmode and rettype parameters... quite confusing it its own right!
Especially as the are multiple different XML file formats for the same
result set.
http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html
http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html
http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html
> But from the current examples in the Bio.Entrez chapter in the tutorial, it appears
> that typically users will have to write some glue code anyway to make optimally
> use of Bio.Entrez for their purposes. In that case, I suppose that whether or not
> we return a handle or an object from the Bio.Entrez.e* functions makes little difference.
Fair point. Certainly the "esearch and efetch" example is relatively
complicated, and having a combined "esearch then parse" function
wouldn't make much difference.
Let's leave this suggestion for the time being (having versions of the
Bio.Entrez functions which include the call to Bio.Entrez.read() to
parse the XML).
Peter
More information about the Biopython-dev
mailing list