[BioPython] biopython tutorial

Peter biopython at maubp.freeserve.co.uk
Wed Aug 6 08:57:45 UTC 2008


>> Something strange is going on - the NCBI didn't give me
>> XML by default as I expected:
>>
>> from Bio import Entrez
>> handle = Entrez.efetch(db="nucleotide",
>> id="57240072",
>> email="A.N.Other at example.com")
>> data = handle.read()
>> print data[:100]
>>
>> It looks like the NCBI may have changed something -
>> Michiel?
>
> In this example, retmode='xml' was missing for the current efetch.
> With retmode='xml', the rest of the example in the Tutorial works correctly. Confusingly, if you use rettype='xml' you will get a different XML output (this is the XML output Nick was looking at).

That sort of explains things - I had tried rettype="xml" last night,
and got something in XML back which didn't look right.  The NCBI have
a table of retmode versus rettype which does point out there is more
than one XML variant you can get back!
http://www.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html

Peter



More information about the Biopython mailing list