[BioPython] SyntaxError in NCBIWWW.BlastParser

Iddo Friedberg idoerg at burnham.org
Tue Jun 22 11:57:01 EDT 2004


Definitely a bug. I think you are the second to report this. I'll have a 
look.

Good catch. Sorry about that.

Iddo

Steven Walter wrote:
> Iddo wrote:
> 
>> Steven Richard Walter wrote:
>>
>>> I'm getting a syntax error when parsing the results from a WWW blast 
>>> query.  Is this a bug in the BioPython code, or am I doing something 
>>> stupid?  In either case, hints on how to track down the problem will 
>>> be greatly appreciated.
>>>
>>>  
>>>
>> Kinda hard to do that without a bit more information.
>>
>> Can you please post the biopython version, Python version, OS you are 
>> using, the sequence file, and (very important) the Python stack dump?
>>
>> Thanks,
>>
>> Iddo
>>
> Sorry about that.  Python version 2.2.3, latest release of biopython on 
> Linux (Fedora Core 2).  Sequence is below the stack trace, run against 
> the nr database with blastn.  Hope that helps, and thanks for your reply
> 
>  >>> file = open("results")
>  >>> from Bio.Blast import NCBIWWW
>  >>> parser = NCBIWWW.BlastParser()
>  >>> parser.parse(file)
> Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIWWW.py", line 47, 
> in parse
>    self._scanner.feed(handle, self._consumer)
>  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIWWW.py", line 99, 
> in feed    self._scan_rounds(uhandle, consumer)
>  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIWWW.py", line 242, 
> in _scan_rounds
>    self._scan_alignments(uhandle, consumer)
>  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIWWW.py", line 325, 
> in _scan_alignments
>    self._scan_pairwise_alignments(uhandle, consumer)
>  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIWWW.py", line 348, 
> in _scan_pairwise_alignments
>    self._scan_one_pairwise_alignment(uhandle, consumer)
>  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIWWW.py", line 379, 
> in _scan_one_pairwise_alignment
>    self._scan_alignment_header(uhandle, consumer)
>  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIWWW.py", line 417, 
> in _scan_alignment_header
>    raise SyntaxError, "I missed the Length in an alignment header"
> SyntaxError: I missed the Length in an alignment header
>  >>>
> 
> gcagcccagccaagcactgtcaggaatcctgtgaagcagctccagctatgtgtgaagaag
> aggacagcactgccttggtgtgtgacaatggctctgggctctgtaaggccggctttgctg
> gggacgatgctcccagggctgttttcccatccattgtgggacgtcccagacatcaggggg
> tgatggtgggaatgggacaaaaagacagctacgtgggtgacgaagcacagagcaaaagag
> gaatcctgaccctgaagtacccgatagaacatggcatcatcaccaactgggacgacatgg
> aaaagatctggcaccactctttctacaatgagcttcgtgttgcccctgaagagcatccca
> ccctgctcacggaggcacccctgaaccccaaggccaaccgggagaaaatgactcaaatta
> tgtttgagactttcaatgtcccagccatgtatgtggctatccaggcggtgctgtctctct
> atgcctctggacgcacaactggcatcgtgctggactctggagatggtgtcacccacaatg
> tccccatctatgagggctatgccttgccccatgccatcatgcgtctggatctggctggcc
> gagatctcactgactacctcatgaagatcctgactgagcgtggctattccttcgttacta
> ctgctgagcgtgagattgtccgggacatcaaggagaaactgtgttatgtagctctggact
> ttgaaaatgagatggccactgccgcatcctcatcctcccttgagaagagttacgagttgc
> ctgatgggcaagtgatcaccatcggaaatgaacgtttccgctgcccagagaccctgttcc
> agccatccttcatcgggatggagtctgctggcatccatgaaaccacctacaacagcatca
> tgaagtgtgatattgacatcaggaaggacctctatgctaacaatgtcctatcagggggca
> ccactatgtaccctggcattgccgaccgaatgcagaaggagatcacggccctagcaccca
> gcaccatgaagatcaagatcattgcccctccggagcgcaaatactctgtctggatcggtg
> gctccatcctggcctctctgtccaccttccagcagatgtggatcagcaaacaggaatacg
> atgaagccgggccttccattgtccaccgcaaatgcttctaaaacactttcctgctcctct
> ctgtctctagcacacaactgtgaatgtcctgtggaattatgccttcagttcttttccaaa
> tcattcctagccaaagctctgactcgttacctatgtgttttttaataaatctgaaatagg
> ctactggtaa
> 

-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037
USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo


More information about the BioPython mailing list