Re: Getting updates and restarting a long running url request.

2013-12-26 Thread Jason Friedman
> Would this not keep requesting/submitting additional (duplicate) BLAST > queries? >> >> try: >> this_result = get_BLAST(id) >> result_dict[id] = True > I assumed that NCBIWWW.qblast waits for a response from the server. Are you saying that instead it queues a request, a

Re: Getting updates and restarting a long running url request.

2013-12-26 Thread Vincent Davis
On Wed, Dec 25, 2013 at 11:24 PM, Jason Friedman wrote: > Could you keep track of success? > > result_dict = dict() > for id in taxid_list: > result_dict[id] = False > while not all(result_dict.values()): # continue if not every ID was > successful > for id in taxid_list: > if res

Re: Getting updates and restarting a long running url request.

2013-12-25 Thread Jason Friedman
> 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", querys

Getting updates and restarting a long running url request.

2013-12-22 Thread Vincent Davis
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