[Biopython-dev] NCBI Abuse activity with Biopython

Michiel de Hoon mjldehoon at yahoo.com
Thu Jun 26 14:49:49 UTC 2008

--- On Thu, 6/26/08, Peter <biopython at maubp.freeserve.co.uk> wrote:
However, if the user has provided the list of GI numbers (e.g. from a file), there is no existing NCBI search data to refer to, and I don't see any other option.  So there is a use-case for the Bio.GenBank.NCBIDictionary class.

In that case, the following can be used:
>>> from Bio import Entrez
>>> idlist = ['123','456','453',.....] # a list of GI numbers
>>> ids = ",".join(idlist)
>>> handle = Entrez.efetch(db='nucleotide', id=ids, retmode='xml')
>>> records = Entrez.read(handle)
# records is now a list of records corresponding to '123', '456', '453',...



More information about the Biopython-dev mailing list