[BioPython] [Biopython] Blastall problem w/ restrict_gi

Roger Barrette rwbarrette at gmail.com
Wed Jun 13 13:17:19 UTC 2007


Hello, I'm new to the list, and relatively new at Python.  I need to run
local blast using tblastx, but I have to limit my searches to subsets of my
local database.  To do this I have gi lists (*.gid.txt file) obtained from
NCBI, to define my subsets.  To run this blast, I'm using the following
command to run blastall in my script:

result_handle, error_info = NCBIStandalone.blastall("/BLAST/blastall.exe",
"tblastx", "/BLAST/DATAout/VirDBX"
                                                    ,
"/BLAST/sequencesXX.fasta", "7", restrict_gi =
"/BLAST/DATAout/10241.gid.txt")

When I include the restrict_gi keyword and option, I get no results back
when I run this through python.  I went into NCBIStandalone and modified it
to print out the command that is supposed to be passed through the os.popen3()
command, which is:

/BLAST/blastall.exe -p tblastx -d /BLAST/DATAout/VirDBX -i
/BLAST/sequencesXX.fasta -m 7 -l /BLAST/DATAout/10241.gid.txt

When I copy this string directly into the windows command line, I get
results, and it works fine, but it doesn't work when called through python.
It does work in Python , however, if I don't include the "restrict_gi"
option.    Can anyone suggest a modification to the Blastall function or how
I call blast from my script that may fix this problem?  T



More information about the Biopython mailing list