def main(args):
    paralog1 = 'YDR418W'
    paralog2 = 'YEL054C'
    paralog = [paralog1, paralog2]
    newicktree = './YeastTree.newick'

    IGC_geo = args.IGC_geo
    sim_num = args.sim_num

    alignment_file = './' + '_'.join(paralog) + '/IGCgeo_' + str(IGC_geo) + '/sim_' + str(sim_num) + '/' + '_'.join(paralog) + '_MG94_geo_' + str(IGC_geo) + '_Sim_' + str(sim_num) + '.fasta'
    save_name = './SimulationSave/' + '_'.join(paralog) + '/IGCgeo_' + str(IGC_geo) + '/' + '_'.join(paralog) + '_MG94_geo_'  + str(IGC_geo) + '_Sim_' + str(sim_num) + '_save.txt'
    summary_name = './SimulationSummary/' + '_'.join(paralog) + '/IGCgeo_' + str(IGC_geo) + '/' + '_'.join(paralog) + '_MG94_geo_'  + str(IGC_geo) + '_Sim_' + str(sim_num) + '_summary.txt'

    # generate folder if not exist
    if not os.path.isdir('./SimulationSave/' + '_'.join(paralog) + '/'):
        os.mkdir('./SimulationSave/' + '_'.join(paralog) + '/')

    if not os.path.isdir('./SimulationSave/' + '_'.join(paralog) + '/IGCgeo_' + str(IGC_geo) + '/'):
        os.mkdir('./SimulationSave/' + '_'.join(paralog) + '/IGCgeo_' + str(IGC_geo) + '/')

    if not os.path.isdir('./SimulationSummary/' + '_'.join(paralog) + '/'):
        os.mkdir('./SimulationSummary/' + '_'.join(paralog) + '/')

    if not os.path.isdir('./SimulationSummary/' + '_'.join(paralog) + '/IGCgeo_' + str(IGC_geo) + '/'):
        os.mkdir('./SimulationSummary/' + '_'.join(paralog) + '/IGCgeo_' + str(IGC_geo) + '/')
        
    test = ReCodonGeneconv( newicktree, alignment_file, paralog, Model = 'MG94', Force = None, clock = False, save_name = save_name)

    test.get_mle(False, True, 0, 'BFGS')
    test.get_individual_summary(summary_path = './SimulationSummary/' + '_'.join(paralog) + '/', file_name = summary_name)
Beispiel #2
0
def main(args):
    paralog1 = 'YDR418W'
    paralog2 = 'YEL054C'
    paralog = [paralog1, paralog2]
    newicktree = './YeastTree.newick'

    IGC_geo = args.IGC_geo
    sim_num = args.sim_num

    alignment_file = './' + '_'.join(paralog) + '/IGCgeo_' + str(
        IGC_geo) + '/sim_' + str(sim_num) + '/' + '_'.join(
            paralog) + '_MG94_geo_' + str(IGC_geo) + '_Sim_' + str(
                sim_num) + '.fasta'
    save_name = './SimulationSave/' + '_'.join(paralog) + '/IGCgeo_' + str(
        IGC_geo) + '/' + '_'.join(paralog) + '_MG94_geo_' + str(
            IGC_geo) + '_Sim_' + str(sim_num) + '_save.txt'
    summary_name = './SimulationSummary/' + '_'.join(
        paralog) + '/IGCgeo_' + str(IGC_geo) + '/' + '_'.join(
            paralog) + '_MG94_geo_' + str(IGC_geo) + '_Sim_' + str(
                sim_num) + '_summary.txt'

    # generate folder if not exist
    if not os.path.isdir('./SimulationSave/' + '_'.join(paralog) + '/'):
        os.mkdir('./SimulationSave/' + '_'.join(paralog) + '/')

    if not os.path.isdir('./SimulationSave/' + '_'.join(paralog) + '/IGCgeo_' +
                         str(IGC_geo) + '/'):
        os.mkdir('./SimulationSave/' + '_'.join(paralog) + '/IGCgeo_' +
                 str(IGC_geo) + '/')

    if not os.path.isdir('./SimulationSummary/' + '_'.join(paralog) + '/'):
        os.mkdir('./SimulationSummary/' + '_'.join(paralog) + '/')

    if not os.path.isdir('./SimulationSummary/' + '_'.join(paralog) +
                         '/IGCgeo_' + str(IGC_geo) + '/'):
        os.mkdir('./SimulationSummary/' + '_'.join(paralog) + '/IGCgeo_' +
                 str(IGC_geo) + '/')

    test = ReCodonGeneconv(newicktree,
                           alignment_file,
                           paralog,
                           Model='MG94',
                           Force=None,
                           clock=False,
                           save_name=save_name)

    test.get_mle(False, True, 0, 'BFGS')
    test.get_individual_summary(summary_path='./SimulationSummary/' +
                                '_'.join(paralog) + '/',
                                file_name=summary_name)
Beispiel #3
0
def main(args):
    paralog = [args.paralog1, args.paralog2]
    Force = None
    clock = False
    alignment_file = "./GeneFamilies/" + "_".join(paralog) + "/" + "_".join(paralog) + "_input.fasta"
    newicktree = "./YeastTree.newick"
    if args.force:
        if model == "MG94":
            Force = {5: 0.0}
        elif model == "HKY":
            Force = {4: 0.0}
    else:
        Force = None
    test = ReCodonGeneconv(newicktree, alignment_file, paralog, Model=args.model, Force=Force, clock=args.clock)
    test.get_mle(True, True, 0, "BFGS")
    test.get_individual_summary(summary_path="./Summary/")
def main(args):
    paralog = [args.paralog1, args.paralog2]
    Force = None
    clock = False
    alignment_file = '../IdenticalParalogAlignment/' + '_'.join(paralog) + '/' + '_'.join(paralog) + '_IdenticalParalog_input.fasta'
    newicktree = './YeastTree.newick'
    if args.force:
        if model == 'MG94':
            Force = {5:0.0}
        elif model == 'HKY':
            Force = {4:0.0}
    else:
        Force = None
    test = ReCodonGeneconv( newicktree, alignment_file, paralog, Model = args.model, Force = Force, clock = args.clock)
    test.get_mle(True, True, 0, 'BFGS')
    test.get_individual_summary(summary_path = './Summary/')
def main(args):
    paralog = [args.paralog1, args.paralog2]
    Force = None
    clock = False
    alignment_file = '../IdenticalParalogAlignment/' + '_'.join(
        paralog) + '/' + '_'.join(paralog) + '_IdenticalParalog_input.fasta'
    newicktree = './YeastTree.newick'
    if args.force:
        if model == 'MG94':
            Force = {5: 0.0}
        elif model == 'HKY':
            Force = {4: 0.0}
    else:
        Force = None
    test = ReCodonGeneconv(newicktree,
                           alignment_file,
                           paralog,
                           Model=args.model,
                           Force=Force,
                           clock=args.clock)
    test.get_mle(True, True, 0, 'BFGS')
    test.get_individual_summary(summary_path='./Summary/')