[BioPython] SwissProt parse error

Jeffrey Chang jeffrey_chang at stanfordalumni.org
Wed Sep 8 17:49:48 EDT 2004


Hi Mike,

Yes, what Iddo said.  Please grab the latest SProt.py code from the  
latest CVS (cvs.biopython.org) and see if that solves your problem.   
Also, I have committed a fix today to handle recent format changes in  
swiss-prot, that was reported in personal correspondence by Daan  
Archer.  They have added an "RG" field.  I don't know whether that is  
causing the problem.  If not, please let us know what swiss-prot record  
is failing to parse.

Thanks,
Jeff


On Sep 8, 2004, at 1:50 PM, Iddo wrote:

>
> Hey Mike,
>
> Asa was using an old version of biopython, and that sorted itself out.  
> However,  he was parsing a local file. Are you parsing a local or one  
> you are reading from the ExPasy website?
>
> Anyhow, if you email me a bare-bones version of your source code, I'll  
> have a looksee.
>
> Iddo
>
>
> The problem then was that Asa was using an old version... but if you
>
> Michael Sierk wrote:
>
>> Hello, all,
>>
>> I'm getting the same error reported last year by Asa Ben Hur (   
>> http://portal.open-bio.org/pipermail/biopython/2003-June/001411.html  
>> ).
>> I just installed biopython a few weeks ago, and am a newbie with   
>> python/biopython.  Any suggestions?
>>
>> Thanks,
>> Mike Sierk
>>
>>> wrpmg4b:~ % python disulfides2.py test_seqs.aln
>>> Swissprot ID:  Q14063
>>> Traceback (most recent call last):
>>>   File "disulfides2.py", line 73, in ?
>>>     seq_record = get_sprot_entry_remote(seq_id)
>>>   File "disulfides2.py", line 26, in get_sprot_entry_remote
>>>     entry = iterator.next()
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/SwissProt/SProt.py", line 166, in next
>>>     return self._parser.parse(File.StringHandle(data))
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/SwissProt/SProt.py", line 290, in parse
>>>     self._scanner.feed(handle, self._consumer)
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/SwissProt/SProt.py", line 333, in feed
>>>     self._scan_record(uhandle, consumer)
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/SwissProt/SProt.py", line 338, in   
>>> _scan_record
>>>     fn(self, uhandle, consumer)
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/SwissProt/SProt.py", line 414, in   
>>> _scan_reference
>>>     self._scan_ra(uhandle, consumer)
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/SwissProt/SProt.py", line 436, in  
>>> _scan_ra
>>>     one_or_more=1)
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/SwissProt/SProt.py", line 360, in   
>>> _scan_line
>>>     read_and_call(uhandle, event_fn, start=line_type)
>>>   File   
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/  
>>> python2.3/site-packages/Bio/ParserSupport.py", line 300, in   
>>> read_and_call
>>>     raise SyntaxError, errmsg
>>> SyntaxError: Line does not start with 'RA':
>>> RX   DOI=10.1146/annurev.nutr.22.012502.114457;
>>
>>
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
>> ++ +++++++
>> Michael Sierk, Postdoctoral Fellow             email:   
>> mls5w<AT>virginia<dot>edu
>> Biochemistry & Molecular Genetics Dept.    Phone (W): (434) 924-2821
>> University of Virginia                           (H): (434) 970-2268
>> ---------------------------------------------------------------------- 
>> -- ------
>> "There is something fascinating about science. One gets such wholesome
>> returns of conjecture out of such a trifling investment of fact."
>> -- Mark Twain.
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
>> ++ +++++++
>>
>> _______________________________________________
>> 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) 713 9930
> http://ffas.ljcrf.edu/~iddo
>
> _______________________________________________
> BioPython mailing list  -  BioPython at biopython.org
> http://biopython.org/mailman/listinfo/biopython
>



More information about the BioPython mailing list