[BioPython] NCBIXML - Blast in- and output

Michiel de Hoon mdehoon at c2b2.columbia.edu
Wed Nov 28 11:54:39 UTC 2007


Dear Björn,

Did you look at the Blast output file you are trying to parse?
It consists of lines like:

blastall] WARNING: 1OR8:E|PDBID|CHAIN|SEQUENCE: Could not calculate 
ungapped Karlin-Altschul parameters due to an invalid query sequence or 
its translation. Please verify the query sequence(s) and/or filtering 
options

and there is no actual Blast output. So I am not surprised the Blast 
parser fails...

--Michiel.

Björn Thorwirth wrote:
> Hi Michiel!
> 
> Thanks for your fast respose! I've used the NCBIXML together with a
> Twisted server. That's why the backtrace is a bit bloatet.
> But I guess this are the important lines:
> 
> File "/home/user/workspace/PLGDaemon/src/mmCIF/blast_util.py", line
> 56,
> in getResults
>     for record in records:
>   File
> "/home/user/Desktop/biopython/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Blast/NCBIXML.py",
> line 625, in parse
>     assert len(blast_parser._records) == 0
> exceptions.UnboundLocalError: local variable 'blast_parser' referenced
> before assignment.
> 
> Now i was able to backtrace, where the Problem comes from. It may not be
> related to 32/64 Bit. It happens when Blast's calculation 
> of the "Karlin-Altschul parameters" fails. This may happen due low
> complexity of the Query sequence (see Blast FAQ).
> I've attached a tar with the Blast-output and the reference and input
> files. I didn't stumble over this problem before on 32 Bit,
> because that was a smaller Sequenze-DB for testing purposes
> 
> Björn



More information about the Biopython mailing list