Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62537 > unrolled thread
| Started by | Vincent Davis <vincent@vincentdavis.net> |
|---|---|
| First post | 2013-12-22 11:06 -0700 |
| Last post | 2013-12-22 11:06 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Getting updates and restarting a long running url request. Vincent Davis <vincent@vincentdavis.net> - 2013-12-22 11:06 -0700
| From | Vincent Davis <vincent@vincentdavis.net> |
|---|---|
| Date | 2013-12-22 11:06 -0700 |
| Subject | Getting updates and restarting a long running url request. |
| Message-ID | <mailman.4496.1387735647.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
I am using biopython's NCBIWWW.qblast which sends a request to the ncbi
website and waits for a result. The relevant code can be found at the link
below starting at about 151. Basically it is a while loop waiting for the
blast query.
http://biopython.org/DIST/docs/api/Bio.Blast.NCBIWWW-pysrc.html
My problem; I am submitting about 75 request (one at a time and with
delays) and they can each take minutes to complete. I think sometimes the
request/response/query fails which results in me needing to restart
the process.
I am looking for suggestion on how to monitor and restart the process if I
think it has failed.
I am using the following code to submit the query/
def get_BLAST(taxid, queryseq, args=None):
'''
Input taxid to BLAST queryseq against
'''
e_query = "txid" + taxid + " [ORGN]"
#, other_advanced='-G 4 -E 1'
blast_result = NCBIWWW.qblast("blastn", "nt", queryseq, megablast=True,
entrez_query=e_query, word_size='11', other_advanced='-G 5 -E 2')
return NCBIXML.read(blast_result)
Vincent Davis
Back to top | Article view | comp.lang.python
csiph-web