Entering edit mode
6.0 years ago
matthewcgchase
•
0
I'm working on trying to automate some BLAST searches. I need to pick up only the top three results from the BLAST results, however the parameter hitlist_size
doesn't seem to be limiting my searches to only three results. No matter what size I specify I still end up getting > 3 hits for most samples (in others I get three, although I'm not sure if this is simply coincidence) . Does anyone have any insight to this?
import Bio
from Bio import SeqIO
from Bio.Blast import NCBIWWW
from Bio.Blast import NCBIXML
fasta_string = open("FASTA_Files/48_50.fasta").read()
result_handle = NCBIWWW.qblast("blastn", "nt", fasta_string, hitlist_size=3)
with open("XML_Files/48_50.xml", "w") as save_to:
save_to.write(result_handle.read())
result_handle.close()
Shouldn't you be using
alignments=3
(ref: http://biopython.org/DIST/docs/api/Bio.Blast.NCBIWWW-module.html ) then?