[BioPython] blast parser

Ken Sugino sugino@brandeis.edu
Mon, 25 Nov 2002 12:12:31 -0500


Hi all,

I encountered an error during a Blast parse:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/sugino/soft.py.modules/biopython-cvs/biopython/Bio/Blast/NCBIWWW.py", line 47, in parse
    self._scanner.feed(handle, self._consumer)
  File "/home/sugino/soft.py.modules/biopython-cvs/biopython/Bio/Blast/NCBIWWW.py", line 98, in feed
    self._scan_header(uhandle, consumer)
  File "/home/sugino/soft.py.modules/biopython-cvs/biopython/Bio/Blast/NCBIWWW.py", line 161, in _scan_header
    self._scan_database_info(uhandle, consumer)
  File "/home/sugino/soft.py.modules/biopython-cvs/biopython/Bio/Blast/NCBIWWW.py", line 174, in _scan_database_info
    read_and_call(uhandle, consumer.noevent, blank=1)
  File "/home/sugino/soft.py.modules/biopython-cvs/biopython/Bio/ParserSupport.py", line 331, in read_and_call
    raise SyntaxError, errmsg
SyntaxError: Expected blank line, but got:
           1,455,628 sequences; 7,234,536,489 total letters


The following change seems to fix this error.

Bio.Blast.NCBIWWW.py line 174
-        read_and_call(uhandle, consumer.noevent, blank=1)
-        read_and_call(uhandle, consumer.noevent,
-                      contains='problems or questions')
+        read_and_call_until(uhandle, consumer.noevent,
+                      contains='problems or questions')
+        read_and_call(uhandle, consumer.noevent)