[BioPython] Report of blast 2.2.15 parsing error.
Sebastian Bassi
sbassi at gmail.com
Mon Nov 27 00:20:52 UTC 2006
I think I found a bug. I am using Biopython 1.42 and Blast 2.2.15.
I got my blast output be running blastall like this:
sbassi at hp:~/bioinfo/blast-2.2.15/bin$ ./blastall -p blastn -d
../data/patnt -i ../data/intest.faa -o ../data/BlastLocal
The output is located here is you need to see it:
http://www.bioinformatica.info/download/BlastLocal
Here is my code:
from Bio.Blast import NCBIStandalone
bout=open('BlastLocal')
b_parser=NCBIStandalone.BlastParser()
b_record=b_parser.parse(bout)
for alig in b_record.alignments:
for hsp in alig.hsps:
hitsequence=hsp.sbjct.replace("-","")
if "Patent WO" in alig.title and len(hitsequence)>80:
print alig.title+";"+hitsequence
and this is the error I get:
>>>
Traceback (most recent call last):
File "/home/sbassi/bioinfo/blastparser.py", line 4, in -toplevel-
b_record=b_parser.parse(bout)
File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIStandalone.py",
line 624, in parse
self._scanner.feed(handle, self._consumer)
File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIStandalone.py",
line 99, in feed
self._scan_parameters(uhandle, consumer)
File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIStandalone.py",
line 570, in _scan_parameters
has_re=re.compile(r"[Ll]ength of \s*[Dd]atabase"))
File "/usr/lib/python2.4/site-packages/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: 118145
This error is not a problem for me since I can use the xml output and
it works fine (with the xml parser), but I was writting a tutorial and
I found this error.
--
Bioinformatics news: http://www.bioinformatica.info
Lriser: http://www.linspire.com/lraiser_success.php?serial=318
More information about the Biopython
mailing list