Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62537 > unrolled thread

Getting updates and restarting a long running url request.

Started byVincent Davis <vincent@vincentdavis.net>
First post2013-12-22 11:06 -0700
Last post2013-12-22 11:06 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Getting updates and restarting a long running url request. Vincent Davis <vincent@vincentdavis.net> - 2013-12-22 11:06 -0700

#62537 — Getting updates and restarting a long running url request.

FromVincent Davis <vincent@vincentdavis.net>
Date2013-12-22 11:06 -0700
SubjectGetting 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web