[Biopython] processing XML files in Biopython

Reece Hart reece at harts.net
Mon Jun 6 14:30:57 UTC 2011


On Mon, Jun 6, 2011 at 6:35 AM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

> If you want to use the XML, then the Bio.Entrez.parse() function should
> turn it into a nested structure of Python objects (dicts and lists). Or,
> there are several built in XML parsers that come with Python, such
> as ElementTree. That could be more efficient if you just wanted to
> get one or two bits of information like a GeneID.
>

In addition, the Bio.Entrez parser is not namespace-aware and therefore
won't parse some NCBI XML at all (e.g., downloaded dbSNP files). Can someone
with more experience here please corroborate?

And, if that is correct, what is the advantage of using Bio.Entrez.parse
over using another Python XML lib?

Thanks,
Reece



More information about the Biopython mailing list