[BioPython] swissprot parser problem
Iddo Friedberg
idoerg at burnham.org
Mon Jun 16 13:40:23 EDT 2003
Works for me. Can you try the latest version off CVS and see if this
repeats?
Thanks,
Iddo
Asa Ben-Hur wrote:
> While iterating over the newest (40.44) swissprot flat file
> using a swissprot parser
> sprotFile = open(sprotFileName)
> s_parser = SProt.RecordParser()
> s_iterator = SProt.Iterator(sprotFile, s_parser)
> I get the following error:
>
> File "extract.py", line 20, in ecExtract
> s_record = s_iterator.next()
> File "/usr/local/lib/python2.2/site-packages/Bio/SwissProt/SProt.py",
> line 168, in next
> return self._parser.parse(File.StringHandle(data))
> File "/usr/local/lib/python2.2/site-packages/Bio/SwissProt/SProt.py",
> line 289, in parse
> self._scanner.feed(handle, self._consumer)
> File "/usr/local/lib/python2.2/site-packages/Bio/SwissProt/SProt.py",
> line 332, in feed
> self._scan_record(uhandle, consumer)
> File "/usr/local/lib/python2.2/site-packages/Bio/SwissProt/SProt.py",
> line 337, in _scan_record
> fn(self, uhandle, consumer)
> File "/usr/local/lib/python2.2/site-packages/Bio/SwissProt/SProt.py",
> line 411, in _scan_reference
> self._scan_ra(uhandle, consumer)
> File "/usr/local/lib/python2.2/site-packages/Bio/SwissProt/SProt.py",
> line 433, in _scan_ra
> one_or_more=1)
> File "/usr/local/lib/python2.2/site-packages/Bio/SwissProt/SProt.py",
> line 359, in _scan_line
> read_and_call(uhandle, event_fn, start=line_type)
> File "/usr/local/lib/python2.2/site-packages/Bio/ParserSupport.py", line
> 331, in read_and_call
> raise SyntaxError, errmsg
> SyntaxError: Line does not start with 'RA':
> RP 550-559; 573-580 AND 584-601 (DELTA-1).
>
> No error occurs on an earlier release 40 file.
> This could be related to the fact that swissprot now has
> multiple RP lines (was not the case in earlier versions)
> Indeed, the entry that caused the error has multiple RP lines.
> Its accession no. is Q14738.
>
> -Asa
>
>
> ^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^!^
> Asa Ben-Hur
> Postdoc, Brutlag Bioinformatics Group
> Stanford
>
>
>
>
>
> _______________________________________________
> BioPython mailing list - BioPython at biopython.org
> http://biopython.org/mailman/listinfo/biopython
>
>
--
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037
USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 646 3171
http://bioinformatics.ljcrf.edu/~iddo
More information about the BioPython
mailing list