[BioPython] SyntaxError in NCBIWWW.BlastParser

Steven Walter srwalt2 at uky.edu
Tue Jun 22 00:33:12 EDT 2004


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

-- 
--Steven
"Time is an abstract concept created by carbon-based life forms to
monitor their on-going decay."
		-Thunderclese
Heartless capitalism has saved more people from poverty than any
progressive program of social equality ever has.
GnuPG Fingerprint: 889A 5BED F01D 61BC 930F  A915 DB55 2585 0010 A205



More information about the BioPython mailing list