[BioPython] SyntaxError raised by BlastParser.

Jeffrey Chang jchang@SMI.Stanford.EDU
Thu, 19 Jul 2001 20:38:01 +0200


[SyntaxError raised by NCBIStandalone.BlastParser]

>For example, the parser raised an error at
>
>Query: 100tt 101
>
>since it lacks a white space between '100' and 'tt'.
>The regular expression the parser uses is
>
>     _query_re = re.compile(r"Query: (\d+)\s+(.+) \d")
>
>(extracted from NCBIStandalone.py:935).

Yes, this would definitely cause the error.


>It might be a bug in BLAST, however I could avoid the
>SyntaxError by modifying the rex as follows:
>
>     _query_re = re.compile(r"Query: (\d+)\s*(.+) \d")
>                                            ^
                                           here


Thanks for the fix!  I went ahead and changed it.

Jeff