I have been using BioPython to perform BLAST queries through NCBI. However, the speed is so slow, it is essentially unusable. The request below takes ~ 7 minutes to complete, while it only takes 11s to BLAST the same sequence using the webtool. I used the same IP for both methods, without making any other requests in the last 24 hours.
sequence_data = '> sequence A\nggtaagtcctctagtacaaacac'
result_handle = NCBIWWW.qblast("blastn", "nt", sequence_data)
blast_results = NCBIXML.parse(result_handle)
I'm surprised at the speed difference, because I thought NCBIWWW was just wrapping direct web-requests. I have an application that needs to make BLAST queries (limit ~1 per 5 minutes). It seems like I'll have to write my own API because NCBIWWW is essentially useless. I do not have the option of running BLAST locally, as this application will be run locally on different users computers.
Has anyone else encountered this problem? Can anyone suggest possible alternatives or solutions? Thanks so much for all of the help. Feeling frustrated and stumped. I really appreciate your time.
How about running this script
ncbiblast.py
from EMBL? Link to download the script and documentation.Are you setting login info? I believe there's a parameter for email address one can set. Without it requests are throttled I think.
Thanks Joe, I will look into that.