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

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Feb 10 08:59:33 EST 2006


           Summary: uniprot release 49/SProt.Record Parser Problem
           Product: Biopython
           Version: Not Applicable
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: gould at embl.de

I've been having problems with some of our applications that use biopython
scripts to retrieve a record from uniprot/swissprot given an accession
nr/ID....As far as I'm aware the problem only occurred after the release 49.0
of uniprot/swissprot db on 6th Feb...I see from the release notes that some
changes were made to the annotation format and suspect this is why the
biopython scripts are no longer happy??....I've checked to make sure I have the
latest version of biopython but this has not remedied the problem.....This
problem would seem to lie with biopython.
Are any fixes is to be made available??
An example of the error being thrown is below:

Python 2.4 (#1, Dec 10 2004, 11:49:12)
[GCC 3.3.1 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio.WWW import ExPASy
>>> from Bio.SwissProt import SProt
>>> from Bio import File
>>> acc='Q14155'
>>> results = ExPASy.get_sprot_raw(acc.strip()).read()
>>>  sp_parser = SProt.RecordParser()
  File "<stdin>", line 1
    sp_parser = SProt.RecordParser()
SyntaxError: invalid syntax
>>>  sp_parser = SProt.RecordParse
  File "<stdin>", line 1
    sp_parser = SProt.RecordParse
SyntaxError: invalid syntax
>>> sp_parser = SProt.RecordParser()
>>> sp_iterator = SProt.Iterator(File.StringHandle(results), sp_parser)
>>> Record = sp_iterator.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/site-packages/Bio/SwissProt/SProt.py", line
, in next
    return self._parser.parse(File.StringHandle(data))
  File "/usr/local/lib/python2.4/site-packages/Bio/SwissProt/SProt.py", line
                                        , in parse
    self._scanner.feed(handle, self._consumer)
  File "/usr/local/lib/python2.4/site-packages/Bio/SwissProt/SProt.py", line
                                        , in feed
    self._scan_record(uhandle, consumer)
  File "/usr/local/lib/python2.4/site-packages/Bio/SwissProt/SProt.py", line
                                        , in _scan_record
    fn(self, uhandle, consumer)
  File "/usr/local/lib/python2.4/site-packages/Bio/SwissProt/SProt.py", line
                                        , in _scan_id
    self._scan_line('ID', uhandle, consumer.identification, exactly_one=1)
  File "/usr/local/lib/python2.4/site-packages/Bio/SwissProt/SProt.py", line
                                        , in _scan_line
    read_and_call(uhandle, event_fn, start=line_type)
  File "/usr/local/lib/python2.4/site-packages/Bio/ParserSupport.py", line 300,
                                     in read_and_ca

    raise SyntaxError, errmsg
SyntaxError: Line does not start with 'ID':


------- 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