[Biopython-dev] ipi parser

Jeffrey Chang jeffrey_chang at stanfordalumni.org
Tue May 18 17:19:57 EDT 2004


Hello,

These errors are nearly always due to changes in the formats of the 
records that occur from time to time.  Do you have a sample file, or 
accession number, that I can use to see what's going on?

Jeff


On May 18, 2004, at 4:12 PM, Pierre Monestie wrote:

> Hello,
> I'm trying to use the Swissprot parser to parse IPI. I read that the 
> parser
> should have been fixed for IPI however I get an error on date when I 
> try to
> parse ipi.HUMAN
> I get:
>  File "dbupdate/src/python/make_sptofasta.py", line 172, in ?
>     parseandoutput('ipi',it,fl[0],fl[1],fl[2],fl[3],fl[4])
>   File "dbupdate/src/python/make_sptofasta.py", line 46, in 
> parseandoutput
>     record = it.next()
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/SwissProt/SProt.py", 
> line
> 166, in next
>     return self._parser.parse(File.StringHandle(data))
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/SwissProt/SProt.py", 
> line
> 290, in parse
>     self._scanner.feed(handle, self._consumer)
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/SwissProt/SProt.py", 
> line
> 333, in feed
>     self._scan_record(uhandle, consumer)
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/SwissProt/SProt.py", 
> line
> 338, in _scan_record
>     fn(self, uhandle, consumer)
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/SwissProt/SProt.py", 
> line
> 379, in _scan_dt
>     self._scan_line('DT', uhandle, consumer.date, exactly_one=1)
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/SwissProt/SProt.py", 
> line
> 360, in _scan_line
>     read_and_call(uhandle, event_fn, start=line_type)
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/ParserSupport.py", 
> line
> 301, in read_and_call
>     method(line)
>   File "/lbri/gen/lib/python2.2/site-packages/Bio/SwissProt/SProt.py", 
> line
> 537, in date
>     self.data.created = cols[1], int(self._chomp(cols[3]))
> ValueError: invalid literal for int(): Human
>
> Thanks in advance for your help
> Pierre Monestie
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev




More information about the Biopython-dev mailing list