[BioPython] Parsing error when parsing a blast report
Brad Chapman
chapmanb at uga.edu
Sun Apr 18 09:47:13 EDT 2004
Hello Pieter and Bertrand;
Pieter:
> >I've tried to parse some output I got through NCBIWWW.Blast. But I
> >receive the following error:
[...]
> >SyntaxError: Unexpected end of stream.
[...]
> >This is the script I used to get this result. I have no idea what 's
> >wrong. Has anyone a clue ? thanks in advance,
The problem isn't the parser, but rather BLASTing against NCBI. This
problem is fixed in CVS and will be in the next release -- Catherine
reported it back in March:
http://portal.open-bio.org/pipermail/biopython/2004-March/001903.html
So you can either use CVS, or the quick fix is to change:
b_results = NCBIWWW.blast(program='tblastn', database='nr',
query=sequence, expect=0.001, entrez_query='Canis familiaris[ORGN]')
to:
b_results = NCBIWWW.blast(program='tblastn', database='nr',
query=sequence, expect=0.001, entrez_query='Canis familiaris[ORGN]',
format_type = "HTML")
Bertrand:
> So I started working on a parser for the XML
> output. It's not completely over yet (missing multiple_alignment,
> support of PSI-BLAST, and a lot of testing) but I can send you the file
> if you want.
If you get this finished and working, we would definitely be willing
to accept it into Biopython -- a parser for XML blast output is
currently missing but desired.
Hope this helps -- let us know if that doesn't fix the problem or
there are any other questions.
Brad
More information about the BioPython
mailing list