[Biopython-dev] [Bug 2502] PSIBlastParser fails with blastpgp 2.2.18 though works with blastpgp 2.2.15
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Fri May 23 11:02:44 UTC 2008
http://bugzilla.open-bio.org/show_bug.cgi?id=2502
------- Comment #6 from biopython-bugzilla at maubp.freeserve.co.uk 2008-05-23 07:02 EST -------
That's an interesting theory - reading directly from standard out is causing
the problem (comment 5). One thing you could try is writing the blastpgp
output to a file, and then opening the file for reading.
I'm not sure if blastpgp has a file output option. You could just try this:
blast_out, error_info = NCBIStandalone.blastpgp(...)
handle = open("blastpgp_2.2.18.txt","w")
handle.write(blast_out.read())
handle.close()
blast_out = open("blastpgp_2.2.18.txt")
b_parser = NCBIStandalone.PSIBlastParser()
b_record = b_parser.parse(blast_out)
...
Or, for a very crude workaround:
from time import sleep
blast_out, error_info = NCBIStandalone.blastpgp(...)
sleep(5*60) #Five minutes
b_parser = NCBIStandalone.PSIBlastParser()
b_record = b_parser.parse(blast_out)
...
If those work, it would be good evidence that your theory is right.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list