[BioPython] Problem with blastx output parsing =~

Italo Maia italo.maia at gmail.com
Wed Jun 13 17:28:42 UTC 2007


Peter, i tried the patch but i received the following error :
>>> from Bio.Blast import NCBIStandalone
>>> parser = NCBIStandalone.BlastParser()
>>> record = parser.parse(file('99.out','r'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
746, in parse
    self._scanner.feed(handle, self._consumer)
  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
101, in feed
    self._scan_parameters(uhandle, consumer)
  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
712, in _scan_parameters
    attempt_read_and_call(uhandle, consumer.threshold, start='Neighboring
words threshold')
  File "/var/lib/python-support/python2.5/Bio/ParserSupport.py", line 358,
in attempt_read_and_call
    method(line)
  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
1333, in threshold
    line, (1,), ncols=2, expected={0:"T:"})
  File "/var/lib/python-support/python2.5/Bio/Blast/NCBIStandalone.py", line
1888, in _get_cols
    (ncols, len(cols), line)
SyntaxError: I expected 2 columns (got 4) in line
Neighboring words threshold: 12


2007/6/13, Peter <biopython at maubp.freeserve.co.uk>:
>
> To update anyone not following bug 2090, I have updated the CVS copy of
> Bio/Blast/NCBIStandalone.py to do a better job of recent plain text
> Blast output. It can now parse the two BLASTX 2.2.15 files Italo sent me.
>
> If anyone want to try this code, you can either update your entire
> Biopython installation to CVS, or simply update the file
> Bio/Blast/NCBIStandalone.py in your python site-packages directory
> (after making a backup). You can get the latest version here:
>
>
> http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/Blast/NCBIStandalone.py?cvsroot=biopython
>
> You want the latest revision, 1.66 (the web interface is normally
> updated within the hour).
>
> Italo - please could we use those two files as test cases to include
> with Biopython? And do let me know if any of your other 24,000 examples
> fails.
>
> Peter
>
> P.S. Biopython can currently only cope with single query plain text
> output from Blast. We recommend using the XML output.
>
>


-- 
"A arrogância é a arma dos fracos."

===========================
Italo Moreira Campelo Maia
Ciência da Computação - UECE
Desenvolvedor WEB
Programador Java, Python

Meu blog ^^ http://eusouolobomal.blogspot.com/

===========================




More information about the Biopython mailing list