This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error reading XML from Homologene efetch()

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

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

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

0 answers

No answers yet.

Log in to answer this question.