[Biopython-dev] [Bug 1948] uniprot release 49/SProt.Record Parser Problem

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Feb 10 10:17:30 EST 2006


------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk  2006-02-10 10:17 -------
I'm not familar with this module, but I get a rather different result.

Could you attached the file that ExPASy.get_sprot_raw() returns to this bug? 
It looks like you got an HTML file back - I would guess this was an error page
due to a temporary problem.  If you try again I think something else will

When I just did this on Windows, I did get a valid looking file back, but
BioPython still failed to parse it:

from Bio.WWW import ExPASy
from Bio.SwissProt import SProt
from Bio import File
results = ExPASy.get_sprot_raw(acc.strip()).read()
sp_parser = SProt.RecordParser()
sp_iterator = SProt.Iterator(File.StringHandle(results), sp_parser)
Record = sp_iterator.next()

It also failed at the iterator next step, but in a different way:
Traceback (most recent call last):
  File "c:\temp\bug1948.py", line 8, in -toplevel-
    Record = sp_iterator.next()
  File "C:\Python23\lib\site-packages\Bio\SwissProt\SProt.py", line 166, in
    return self._parser.parse(File.StringHandle(data))
  File "C:\Python23\lib\site-packages\Bio\SwissProt\SProt.py", line 290, in
    self._scanner.feed(handle, self._consumer)
  File "C:\Python23\lib\site-packages\Bio\SwissProt\SProt.py", line 332, in
    self._scan_record(uhandle, consumer)
  File "C:\Python23\lib\site-packages\Bio\SwissProt\SProt.py", line 337, in
    fn(self, uhandle, consumer)
  File "C:\Python23\lib\site-packages\Bio\SwissProt\SProt.py", line 378, in
    self._scan_line('DT', uhandle, consumer.date, exactly_one=1)
  File "C:\Python23\lib\site-packages\Bio\SwissProt\SProt.py", line 359, in
    read_and_call(uhandle, event_fn, start=line_type)
  File "C:\Python23\lib\site-packages\Bio\ParserSupport.py", line 301, in
  File "C:\Python23\lib\site-packages\Bio\SwissProt\SProt.py", line 551, in
    assert rel_index >= 0, \
AssertionError: Could not find Rel. in DT line: DT   01-NOV-1997, integrated
into UniProtKB/Swiss-Prot.

Looking at the file returned gave:

>>> print results
ID   ARHG7_HUMAN    STANDARD;      PRT;   803 AA.
AC   Q14155; Q6P9G3; Q6PII2; Q86W63; Q8N3M1;
DT   01-NOV-1997, integrated into UniProtKB/Swiss-Prot.
DT   19-JUL-2004, sequence version 2.
DT   07-FEB-2006, entry version 55.
DE   Rho guanine nucleotide exchange factor 7 (PAK-interacting exchange
DE   factor beta) (Beta-Pix) (COOL-1) (p85).

Reading Bio/SwissProt/Spot.py class _RecordConsumer method date(), none of
those three DT lines look like what the code is expecting.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the Biopython-dev mailing list