Error reading XML from Homologene efetch()
0
0
Entering edit mode
3.9 years ago

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 • 1.1k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2828 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6