[BioPython] Problems parsing proteins

Bonis Sanz, Julio JBonis at imim.es
Thu May 6 05:47:14 EDT 2004


I have reviewed and get an error:

The code is now:

#######################
from Bio import GenBank
rParser = GenBank.FeatureParser()
rDict = GenBank.NCBIDictionary(database='protein'),parser = rParser)
rDict[33990955]
#######################
(the error was in the definition of database, protein is correct instead of
proteins)

but it gives me an error also:

Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "c:\apache2\python\Lib\site-packages\Bio\GenBank\__init__.py", line
1554, in __getitem__
    raise KeyError, x
KeyError: ERROR, possibly because id not available?


If you try in a browser:

http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&val=33990955

It works (so the id 33990955 is available).

In my computer, I have no problems to retrieve genes (nucleotide
database)... I have found errors with proteins only.

Waiting for comments.

Julio Bonis Sanz MD
http://www.juliobonis.com/portal/

Biomedical Informatics Laboratory
Group of Research in Biomedical Informatics (GRIB) http://www.imim.es/grib/
Municipal Institute of Medical Research (IMIM) http://www.imim.es/
Barcelona - Spain

-----Mensaje original-----
De: Bonis Sanz, Julio 
Enviado el: jueves, 06 de mayo de 2004 11:12
Para: biopython at biopython.org
Asunto: [BioPython] Problems parsing proteins


Hi all!, 

I am trying to get some info about proteins from NCBI. This is a very simple
example:

#######################
from Bio import GenBank
rParser = GenBank.FeatureParser()
rDict = GenBank.NCBIDictionary(database='proteins'),parser = rParser)
rDict[4503383]
#######################

but it returns this error:

Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "c:\apache2\python\Lib\site-packages\Bio\GenBank\__init__.py", line
1574, in __getitem__
    raise KeyError, "I unexpectedly got back html-formatted data."
KeyError: I unexpectedly got back html-formatted data.


I can not find a solution, maybe NCBI has change its formats?... 

If somebody can help!!!!!

Julio Bonis Sanz MD
http://www.juliobonis.com/portal/

Biomedical Informatics Laboratory
Group of Research in Biomedical Informatics (GRIB) http://www.imim.es/grib/
Municipal Institute of Medical Research (IMIM) http://www.imim.es/
Barcelona - Spain
_______________________________________________
BioPython mailing list  -  BioPython at biopython.org
http://biopython.org/mailman/listinfo/biopython


More information about the BioPython mailing list