[BioPython] Problem with blastx output parsing =~

Peter biopython at maubp.freeserve.co.uk
Mon Jun 4 17:05:40 UTC 2007


Italo Maia wrote:
> Well, i have a perfectly fine blastx output that throws an error when parsed
> by biopython.
> It gives me this output:
> 
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
> 624, in parse
>    self._scanner.feed(handle, self._consumer)
>  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
> 99, in feed
>    self._scan_parameters(uhandle, consumer)
>  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
> 570, in _scan_parameters
>    has_re=re.compile(r"[Ll]ength of \s*[Dd]atabase"))
>  File "/var/lib/python-support/python2.5/Bio/ParserSupport.py", line 300,
> in read_and_call
>    raise SyntaxError, errmsg
> SyntaxError: Line does not match regex '[Ll]ength of \s*[Dd]atabase':
> Number of HSP's gapped: 136690
> 
> What could i do??? I'm using ubuntu feisty here.

It looks like you are using the plain text output from blast, so we 
would recommend you try the XML output instead.

See section 3.4 of the tutorial:
http://biopython.org/DIST/docs/tutorial/Tutorial.html

If you really want to use the plain text output, please file a bug 
(including Biopython version number) and then attach the plain text 
blast output which fails. But no promises - its an uphill battle to keep 
the parser up to date with each version of Blast!

Peter




More information about the Biopython mailing list