[Biopython] Is there any Entrez Gene parser out there?
David Winter
winda002 at student.otago.ac.nz
Tue Oct 13 19:37:52 EDT 2009
On Wed, 14 Oct 2009 11:45:13 Carlos Javier Borroto wrote:
> Do biopython have a parser for Entrez Gene?, Does someone know if
> there is any python parser for this database at all?
>
> I see there is one on Bioperl, but I'll be happy if I can stick to python.
Hi Carlos,
I don't have much experience with the Entrez module, so this might not be the
best way (I thought I should reply before you where forced to resort to Perl
;)
If you use Bio.Entrez.esummary() you can get a list of python dictionaries for
a given record. Something like this:
>>> Entrez.email = "you at someplace"
>>> query = Entrez.esummary(db="gene", id="641535")
>>> record = Entrez.read(query)
>>> record
[{'Mim': [], 'Orgname': 'Tribolium castaneum', 'TaxID': 7070 ...
>>>for field in record:
... print field["Chromosome"]
LG2
There's also documentation in the tutorial and a related cookbook example on
the wiki:
http://www.biopython.org/wiki/Annotate_Entrez_Gene_IDs
Cheers,
David
More information about the Biopython
mailing list