[Biopython] Is there any Entrez Gene parser out there?

Sean Davis sdavis2 at mail.nih.gov
Wed Oct 14 01:04:20 UTC 2009


On Tue, Oct 13, 2009 at 7:37 PM, David Winter
<winda002 at student.otago.ac.nz>wrote:

> 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.
>
>
If you like, there are simple tab-delimited files that contain much of the
information that you might want:

ftp://ftp.ncbi.nih.gov/gene/DATA/

You can push these into sqlite or another RDBMS or just read them into
python directly.

Sean



> 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
>
>
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>



More information about the Biopython mailing list