[Biopython] Problem using efetch

Peter biopython at maubp.freeserve.co.uk
Tue Jul 14 22:08:50 UTC 2009


On Tue, Jul 14, 2009 at 4:39 PM, bar tomas<bartomas at gmail.com> wrote:
> Hi,
>
> I’m using BioPython to access Entrez databases.  I’m following
> the BioPython tutorial. I’ve tried retrieving all record ids from
> pcassay database with esearch and then retrieving the first full
> record on the list with efetch:
>
> handle = Entrez.esearch(db="pcassay", term="ALL[filt]")
>
> print record["IdList"]
>
> # This prints the following list of ids:
>
> # ['1866', '1865', '1864', '1863', '1862', '1861', '1033', '1860', etc.
>
>
> But when I then try to retrieve the first record:
>
> handle2 = Entrez.efetch(db="pcassay", id="1866")
>
> I get the following error :
>
> <html>
> <body>
> <br/><h2>Error occurred: Report 'ASN1' not found in 'pcassay'
> presentation</h2><br/><ul title="some params from request:">
> <li>db=pcassay</li>
> ...
>
> Do you have an idea of what I’m doing wrong?

This isn't anything wrong with Biopython - this is the sort of
slightly cryptic error the NCBI gives when the return type
and/or return mode isn't supported. Apparently the default
(ASN1) isn't supported for this database. The NCBI efetch
documentation is a little vague or simply missing for the
less main-stream databases. You can make some
guesses from playing with the Entrez website, e.g.

>>> print Entrez.efetch(db="pcassay", id="1866", rettype="uilist").read()
<html><head><title>PmFetch response</title></head><body>
<pre>
1866
</pre></body></html>
>>> print Entrez.efetch(db="pcassay", id="1866", rettype="uilist", retmode="text").read()
1866
>>> print Entrez.efetch(db="pcassay", id="1866", rettype="abstract", retmode="text").read()

1: AID: 1866
Name:  Epi-absorbance-based counterscreen assay for selective VIM-2 inhibitors:
biochemical high throughput screening assay to identify inhibitors of TEM-1
serine-beta-lactamase.
Source:  The Scripps Research Institute Molecular Screening Center
Description:   Source (MLPCN Center Name): The Scripps Research Institute
...

You could also try emailing the NCBI for advice.

Peter




More information about the Biopython mailing list