I'm new to Biopython, and programming in general, but I am trying to create a small script that will query a large number of RNA sequences for BLAST query. Right now, I'm using Biopython and qblast, but I'm finding that during certain times of day, it takes 7-8 minutes for a single query. Is there a better way to accomplish this, other than running BLAST locally? I've been told that we would like to avoid that as much as possible.
My code currently looks something like this:
for sequence in sequences:
while True: try: resultHandle = NCBIWWW.qblast("blastn","nr", sequence) if serverWasDown: print "Server is up and running again." break except: print "Server connection lost, waiting 10 seconds to try agiain. Please make sure the computer has a working network connection." serverWasDown = True time.sleep(10)