def genetree_worker(params):
    """Worker function to compute genetrees for individual loci"""
    locus, fullpth = params
    name, phylip = locus
    pth, exe = os.path.split(fullpth)
    args_dict = {}
    phyml = Phyml(phylip, pth=pth, exe=exe)
    model, tree = phyml.best_aicc_model_and_tree()
    args_dict["chrm"] = name
    args_dict["model"] = model
    tree = "tree '%s' = [&U] %s" % (make_tree_name(args_dict), tree)
    sys.stdout.write("[Info] {0} {1} genetree completed\n".format(strftime("%a, %d %b %Y %H:%M:%S", localtime()), name))
    sys.stdout.flush()
    return (name, model, tree)
Esempio n. 2
0
def genetree_worker(params):
    """Worker function to compute genetrees for individual loci"""
    locus, fullpth = params
    name, phylip = locus
    pth, exe = os.path.split(fullpth)
    args_dict = {}
    phyml = Phyml(phylip, pth=pth, exe=exe)
    model, tree = phyml.best_aicc_model_and_tree()
    args_dict['chrm'] = name
    args_dict['model'] = model
    tree = "tree '%s' = [&U] %s" % (make_tree_name(args_dict), tree)
    sys.stdout.write("[Info] {0} {1} genetree completed\n".format(
        strftime("%a, %d %b %Y %H:%M:%S", localtime()), name))
    sys.stdout.flush()
    return (name, model, tree)