On Wed, Dec 25, 2013 at 11:24 PM, Jason Friedman <jsf80...@gmail.com> 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 result_dict[id]: > continue # We were already successful with this ID > try: > this_result = get_BLAST(id) > result_dict[id] = True > except: > print("A warning.") > Thanks for your response. Would this not keep requesting/submitting additional (duplicate) BLAST queries? > try: > this_result = get_BLAST(id) > result_dict[id] = True It seems like I need to use threading, and there appears to be no way to know if NCBIWWW.qblast is still waiting on results. It will either give a result or possibly produce and error I suppose if the for example I lost the connection to the internet but I am not really sure about that. That said after some more research I found this tread. http://lists.open-bio.org/pipermail/biopython/2013-April/008507.html Vincent Davis
-- https://mail.python.org/mailman/listinfo/python-list