Getting updates and restarting a long running url request.
Vincent Davis
vincent at vincentdavis.net
Sun Dec 22 13:06:56 EST 2013
More information about the Python-list mailing list
Sun Dec 22 13:06:56 EST 2013
- Previous message (by thread): BLANK PAGE when i try Filtering Adsense with abpy
- Next message (by thread): Getting updates and restarting a long running url request.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20131222/1a38738a/attachment.html>
- Previous message (by thread): BLANK PAGE when i try Filtering Adsense with abpy
- Next message (by thread): Getting updates and restarting a long running url request.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list