Question: Error reading XML from Homologene efetch()
0
gravatar for Axel.Kowald
6 weeks ago by
Axel.Kowald0 wrote:

Hello Everybody,

I installed Biopython 1.77 and want to read a record from the NCBI Homologene db like this:

handle = Bio.Entrez.efetch(db='HomoloGene', id=134538, retMode='xml')
recordH = Bio.Entrez.read(handle)

Unfortunately read(handle) produces an error like:

"ValueError: As the XML data contained neither a Document Type Definition (DTD) nor an XML Schema for tag 'Entrez-Homologene-Set', Bio.Entrez is unable to parse these data. We recommend using a generic XML parser from the Python standard library instead, for example ElementTree."

Any idea what I'm doing wrong ?

Many thanks

biopython • 84 views
ADD COMMENTlink written 6 weeks ago by Axel.Kowald0

I don't think you are doing anything wrong. Looks like biopython is not able to parse xml format that is returned.

If you don't specify xml format you will get the following. Perhaps you can parse that instead.

$ efetch -db homologene -id "134538" 
1: HomoloGene: 134538.Gene conserved in Boreoeutheria
GNL3L   guanine nucleotide binding protein-like 3 (nucleolar)-like      Homo sapiens
GNL3L   guanine nucleotide binding protein-like 3 (nucleolar)-like      Pan troglodytes
GNL3L   guanine nucleotide binding protein-like 3 (nucleolar)-like      Macaca mulatta
GNL3L   guanine nucleotide binding protein-like 3 (nucleolar)-like      Canis lupus familiaris
GNL3L   guanine nucleotide binding protein-like 3 (nucleolar)-like      Bos taurus
Gnl3l   guanine nucleotide binding protein-like 3 (nucleolar)-like      Mus musculus
Gnl3l   guanine nucleotide binding protein-like 3 (nucleolar)-like      Rattus norvegicus
ADD REPLYlink modified 6 weeks ago • written 6 weeks ago by genomax85k

Okay, thanks. I will then parse the text format.

ADD REPLYlink written 6 weeks ago by Axel.Kowald0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1102 users visited in the last hour