def try_run_ovlp_filter(n_core, ovl, fofn, max_diff, max_cov, min_cov, min_len, bestn, db_fn): io.LOG('starting ovlp_filter') file_list = io.validated_fns(ovl) if ovl != None else io.validated_fns( fofn) io.LOG('fofn %r: %r' % (ovl if ovl != None else fofn, file_list)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) try: run_ovlp_filter(exe_pool, ovl, file_list, max_diff, max_cov, min_cov, min_len, bestn, db_fn) io.LOG('finished ovlp_filter') except: io.LOG('terminating ovlp_filter workers...') exe_pool.terminate() raise
def try_run_ovlp_stats(n_core, fofn, min_len): io.LOG('starting ovlp_stats') file_list = io.validated_fns(fofn) io.LOG('fofn %r: %r' %(fofn, file_list)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) try: run_ovlp_stats(exe_pool, file_list, min_len) io.LOG('finished ovlp_stats') except KeyboardInterrupt: io.LOG('terminating ovlp_stats workers...') exe_pool.terminate()
def try_run_ovlp_stats(n_core, fofn, min_len): io.LOG('starting ovlp_stats') file_list = io.validated_fns(fofn) io.LOG('fofn %r: %r' % (fofn, file_list)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) try: run_ovlp_stats(exe_pool, file_list, min_len) io.LOG('finished ovlp_stats') except KeyboardInterrupt: io.LOG('terminating ovlp_stats workers...') exe_pool.terminate()
def try_run_ovlp_filter(n_core, fofn, max_diff, max_cov, min_cov, min_len, bestn, db_fn): io.LOG("starting ovlp_filter") file_list = io.validated_fns(fofn) io.LOG("fofn %r: %r" % (fofn, file_list)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) try: run_ovlp_filter(exe_pool, file_list, max_diff, max_cov, min_cov, min_len, bestn, db_fn) io.LOG("finished ovlp_filter") except KeyboardInterrupt: io.LOG("terminating ovlp_filter workers...") exe_pool.terminate()
def try_run_ovlp_filter(n_core, fofn, max_diff, max_cov, min_cov, min_len, bestn, db_fn): io.LOG('starting ovlp_filter') file_list = io.validated_fns(fofn) io.LOG('fofn %r: %r' %(fofn, file_list)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) try: run_ovlp_filter(exe_pool, file_list, max_diff, max_cov, min_cov, min_len, bestn, db_fn) io.LOG('finished ovlp_filter') except: io.LOG('terminating ovlp_filter workers...') exe_pool.terminate() raise
def try_run_ovlp_stats(n_core, db_fn, fofn, min_len): io.LOG('starting ovlp_stats') file_list = io.validated_fns(fofn) io.LOG('fofn {!r}: {}'.format(fofn, file_list)) io.LOG('db {!r}; n_core={}'.format(db_fn, n_core)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) try: run_ovlp_stats(exe_pool, db_fn, file_list, min_len) io.LOG('finished ovlp_stats') except KeyboardInterrupt: io.LOG('terminating ovlp_stats workers...') exe_pool.terminate()
def try_run_ovlp_filter(out_fn, n_core, fofn, max_diff, max_cov, min_cov, min_len, min_idt, ignore_indels, bestn, db_fn): io.LOG('starting ovlp_filter') file_list = io.validated_fns(fofn) io.LOG('fofn %r: %r' % (fofn, file_list)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) tmp_out_fn = out_fn + '.tmp' try: with open(tmp_out_fn, 'w') as outs: run_ovlp_filter(outs, exe_pool, file_list, max_diff, max_cov, min_cov, min_len, min_idt, ignore_indels, bestn, db_fn) os.rename(tmp_out_fn, out_fn) io.LOG('finished ovlp_filter') except: io.LOG('terminating ovlp_filter workers...') exe_pool.terminate() raise
def try_run_ovlp_filter(out_fn, n_core, fofn, max_diff, max_cov, min_cov, min_len, bestn, db_fn): io.LOG('starting ovlp_filter') file_list = io.validated_fns(fofn) io.LOG('fofn %r: %r' % (fofn, file_list)) n_core = min(n_core, len(file_list)) exe_pool = Pool(n_core) tmp_out_fn = out_fn + '.tmp' try: with open(tmp_out_fn, 'w') as outs: run_ovlp_filter(outs, exe_pool, file_list, max_diff, max_cov, min_cov, min_len, bestn, db_fn) outs.write('---\n') os.rename(tmp_out_fn, out_fn) io.LOG('finished ovlp_filter') except: io.LOG('terminating ovlp_filter workers...') exe_pool.terminate() raise