[Biopython] get more than 20 IDs in IdList
David Winter
winda002 at student.otago.ac.nz
Thu Dec 6 02:07:30 UTC 2012
Hi Mark,
This is the default behaviour for the EUtils API
http://www.ncbi.nlm.nih.gov/books/NBK25499/
To get more than 20 records you need to set the "retmax" parameter to some other number:
>>> handle = Entrez.esearch(db="protein",term="txid9606[Orgn] AND cftr", retmax=200)
Hope that helps,
David Winter
________________________________________
From: biopython-bounces at lists.open-bio.org [biopython-bounces at lists.open-bio.org] on behalf of Mark Budde [markbudde at gmail.com]
Sent: Thursday, 6 December 2012 1:53 p.m.
To: biopython at lists.open-bio.org
Subject: [Biopython] get more than 20 IDs in IdList
Can someone help me understand how to get more than 20 records in the
IdList from esearch?
>>> from Bio import Entrez
>>> Entrez.email = "markbudde at gmail.com"
>>> handle = Entrez.esearch(db="protein",term="txid9606[Orgn] AND cftr")
>>> record = Entrez.read(handle)
>>> len(record["IdList"])
20
>>> record["Count"]
'354'
It seems that I can only ever get 20 IDs in the "IdList", even though the
"Count" can be much higher.
Thanks,
Mark
_______________________________________________
Biopython mailing list - Biopython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython
More information about the Biopython
mailing list