[BioPython] Querying Entrez Gene
Christof Winter
winter at biotec.tu-dresden.de
Tue Oct 10 12:50:46 UTC 2006
Dear Luca,
you probably need this:
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/
The code below is Python, not Biopython, but should work. You further need to parse the
resulting XML. There is also an EUtils package as part of Biopython, but I never tried it:
http://biopython.org/DIST/docs/api/public/Bio.EUtils-module.html
Cheers,
Christof
# Python eutils example
import urllib2
eutilsURL = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/"
def esummary(db, ids):
idlist = ",".join(ids)
url = eutilsURL + "esummary.fcgi?db=%(db)s&id=%(idlist)s&retmode=xml"
req = urllib2.Request(url % vars())
handle = urllib2.urlopen(req)
return handle.read()
print esummary("gene", ["3487"])
Luca Beltrame wrote:
> Hello.
> I'm currently in need of querying the Entrez Gene database using a list of IDs
> I have. After searching in the Biopython documentation, I have found no
> indication of whether that is possible or not.
> Is there a way to query NCBI's Entrez Gene database?
> Thanks in advance.
> _______________________________________________
> BioPython mailing list - BioPython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
More information about the Biopython
mailing list