[BioPython] PSIBlastParser behavior

Brad Chapman chapmanb at uga.edu
Wed May 5 05:39:28 EDT 2004


Hi John;
Sorry for the delay in getting back with you about this.

> I am observing an unexpected behavior using the PSIBlastParser.  I am
> doing a simple PSI-Blast run:
[...]
> SyntaxError: Line does not start with '  Database':
> Results from round 1

Hmmm, I can not seem to repeat this. I tried both Blast 2.2.6 and
the most recent 2.2.8 version and both seem to parse fine, using the
following code:

from Bio import db

input_file = "channel.fasta"
fasta_fetch = db["fasta"]
fasta_info = fasta_fetch["CNG4_BOVIN"]
input_handle = open(input_file, "w")
input_handle.write(fasta_info.read())
input_handle.close()

from Bio.Blast import NCBIStandalone

result_handle, error_handle = NCBIStandalone.blastpgp(
        "/usr/local/bin/blastpgp", "swissprot", input_file,
        expectation = 1e-5, npasses = 2)

parser = NCBIStandalone.PSIBlastParser()
rec = parser.parse(result_handle)
print rec

Would you be able to give me more information so I can try to fix
the parser? Either sending an output file that demonstrates the
problem to me directly, or letting me know what version of BLAST and
databases and everything that you are using, would work great.

Thanks for the report.
Brad


More information about the BioPython mailing list