[Biopython-dev] [Bug 2340] SProt.py fails to parse the current Swiss-Prot version 54.0
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Thu Jul 26 16:06:15 UTC 2007
http://bugzilla.open-bio.org/show_bug.cgi?id=2340
------- Comment #2 from gould at embl.de 2007-07-26 12:06 EST -------
(In reply to comment #0)
> Hi,
>
> I'm running on a red hat linux box on python 2.3.4 and am trying to parse any
> swiss-prot record but the parser just seems to bomb out not throwing an error
> of where it actually fails. I'm guessing it has to do with the Release 54.0 of
> 24-Jul-07 of UniPROT with the addition of the new line type PE??
>
(In reply to comment #1)
> Hi Kate,
>
> Could you give us the URL of one or two specific SwissProt files you're having
> trouble with.
>
> Also how are you trying to read the SwissProt files? e.g. with
> Bio.SeqIO.parse()?
>
> If you could include the python error too, that could be helpful. Thanks.
>
> Peter
>
hi
the following snippet of code is where the error occurs(this used to work no
problem before something changed in the last day or two I guess)
def getSequence(self,acc):
""" This method retrieves the most recent annotated sequence from the ExPASy
server for a given accession number. """
from Bio.WWW import ExPASy
from Bio.SwissProt import SProt
from Bio import File
if acc != '':
try:
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()
return Record.sequence.strip()
except:
return -1
else:
return acc
breaks at line : Record = sp_iterator.next() but doesn't print any error to
terminal....
some examples of accessions nrs used are: P01100, P12522 etc
thanks
Kate
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- 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