Biopython: qBLAST only retrieving 50 hits, inserting "hitlist_size=100" does not change it.
1
0
Entering edit mode
9.2 years ago
atapee ▴ 10

I've been wanting to retrieve the first 100 hits from my blast, but it always produces only the first 50 hits (as set by default) and I am unable to change it.

save_file = open("C:/Users/.../my_blast.xml", "w")
result_handle = NCBIWWW.qblast("blastp", "nr", "4504191", "hitlist_size=100", entrez_query="mammalia[Orgn]")
save_file.write(result_handle.read())
save_file.close()
result_handle.close()

This is the snippet of code that I am using. Is there any other way of changing it?

biopython blast • 2.7k views
ADD COMMENT
2
Entering edit mode
9.2 years ago
David W 4.9k

"hitlist_size=100" shouldn't be in quotes.

ADD COMMENT
0
Entering edit mode

Thank you, that did the trick! Is everything else quoted properly?

ADD REPLY
0
Entering edit mode

Looks fine to me. Remember, anything in quotes becomes a string. In this case you wanted to refer to one of the named arguments of qbast (hitlist_size), so you want to use that name and not a string in setting the arguments value.

ADD REPLY

Login before adding your answer.

Traffic: 2498 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6