[Biopython] Entrez.efetch rettype retmode
Robert Campbell
robert.campbell at queensu.ca
Wed Apr 21 16:14:10 EDT 2010
Hello Silvio,
On Wed, 21 Apr 2010 20:34:54 +0200 Silvio Tschapke
<silvio.tschapke at googlemail.com> wrote:
> Hello.
>
> I am new to Biopython and I tried to download a whole record with efetch.
> The problem is that I get an error message in the output:
> ""Report 'full' not found in 'pmc' presentation""
> Maybe I haven't understood the whole principle.
>
> But isn't it the goal of pmc to provide full text? I have read the help-page
> of efetch but it doesn't help me a lot.
>
>
> ----
> handle = Entrez.efetch(db="pmc", id="2531137", rettype="full",
> retmode="text")
> string = str(handle.read())
The documentation on efetch
(http://www.ncbi.nlm.nih.gov/corehtml/query/static/efetchlit_help.html)
specifies that:
pmc - PubMed Central contains a number of articles classified as "open
access" for which you may download the full text as XML. For the remaining
articles in PMC you may download only the abstracts as XML.
So you just need to change your retmode='text' to retmode='xml' and omit the
rettype option altogether. You will find that not all articles are free to
download this way though. I tried a random one and got an error message that
the particular journal didn't allow download of full text as XML.
Cheers,
Rob
--
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Botterell Hall Rm 644
Department of Biochemistry, Queen's University,
Kingston, ON K7L 3N6 Canada
Tel: 613-533-6821 Fax: 613-533-2497
<robert.campbell at queensu.ca> http://pldserver1.biochem.queensu.ca/~rlc
More information about the Biopython
mailing list