BioPython BLAST unusable?
0
0
Entering edit mode
6 months ago
John ▴ 10

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.

NCBI blastn BioPython API BLAST • 772 views
ADD COMMENT
1
Entering edit mode

How about running this script ncbiblast.py from EMBL? Link to download the script and documentation.

ADD REPLY
1
Entering edit mode

Are you setting login info? I believe there's a parameter for email address one can set. Without it requests are throttled I think.

ADD REPLY
0
Entering edit mode

Thanks Joe, I will look into that.

ADD REPLY

Login before adding your answer.

Traffic: 2836 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