Esempio n. 1
0
def do_test_job(input_directory, gurobi_log_file):
    logging.info(
        'Let\'s do comparison test for the GMP-ILP. Input directory is {0}'.
        format(input_directory))

    for path, name in get_immediate_subdirectories(input_directory):
        for subpath, subname in get_immediate_subdirectories(path):
            if os.path.isfile(subpath):
                continue

            logging.info("Working with directory {0}".format(subpath))
            ilppath = os.path.join(subpath, "heur_ilp")

            genome1 = os.path.join(ilppath, "S1.gen")
            genome2 = os.path.join(ilppath, "S2.gen")
            genome3 = os.path.join(ilppath, "S4.gen")

            result_out_file = os.path.join(ilppath, "result.txt")
            genome_out_file = os.path.join(ilppath, "median.gen")

            medians_without_singletons(
                genome_files=[genome1, genome2, genome3],
                out_result_file=result_out_file,
                out_median_file=genome_out_file,
                problem="CGMP",
                gurobi_log_file=gurobi_log_file,
                time_limit=7200)
def do_test_job(input_directory, gurobi_log_file):
    logging.info(
        'Let\'s do comparison test for the IGMP-ILP. Input directory is {0}'.
        format(input_directory))

    for path, name in get_immediate_subdirectories(input_directory):
        for subpath, subname in get_immediate_subdirectories(path):
            if os.path.isfile(subpath):
                continue

            logging.info("Working with directory {0}".format(subpath))
            ilppath = os.path.join(subpath, "igmp_ilp")

            genome1 = os.path.join(ilppath, "S1.gen")
            genome2 = os.path.join(ilppath, "S2.gen")
            genome3 = os.path.join(ilppath, "S4.gen")

            result_out_file = os.path.join(ilppath, "result.txt")
            genome_out_file = os.path.join(ilppath, "median.gen")

            solve_restricted_median_problem(
                genome_files=[genome1, genome2, genome3],
                out_result_file=result_out_file,
                out_median_file=genome_out_file,
                gurobi_log_file=gurobi_log_file)
def do_test_job(input_directory, gurobi_log_file):
    logging.info(
        'Let\'s do comparison test for the CGGHP-ILP. Input directory is {0}'.
        format(input_directory))

    for path, name in get_immediate_subdirectories(input_directory):
        for subpath, subname in get_immediate_subdirectories(path):
            if os.path.isfile(subpath):
                continue

            logging.info("Working with directory {0}".format(subpath))
            ilppath = os.path.join(subpath, "heur_ilp")

            ordinary_genome_file = os.path.join(ilppath, "B.gen")
            all_dupl_genome_file = os.path.join(ilppath, "A.gen")

            result_out_file = os.path.join(ilppath, "result.txt")
            genome_out_file = os.path.join(ilppath, "pre_dup.gen")

            halvings_without_singletons(
                ordinary_genome_file=ordinary_genome_file,
                all_dupl_genome_file=all_dupl_genome_file,
                out_result_file=result_out_file,
                out_predup_file=genome_out_file,
                problem="CGGHP",
                gurobi_log_file=gurobi_log_file,
                time_limit=7200)
def do_job_tannier_dataset(name_directory, gurobi_log_file):
    logging.info(
        'Let\'s do the CGGHP-ILP calculations for Tannier\'s dataset. Input directory is {0}'
    )

    for path, name in get_immediate_subdirectories(name_directory):
        if os.path.isfile(path):
            continue

        logging.info("Working with directory {0}".format(path))
        ilppath = os.path.join(path, "heur_ilp")

        ordinary_genome_file = os.path.join(ilppath, "B.gen")
        all_dupl_genome_file = os.path.join(ilppath, "A.gen")

        result_out_file = os.path.join(ilppath, "result.txt")
        genome_out_file = os.path.join(ilppath, "pre_dup.gen")

        halvings_without_singletons(ordinary_genome_file=ordinary_genome_file,
                                    all_dupl_genome_file=all_dupl_genome_file,
                                    out_result_file=result_out_file,
                                    out_predup_file=genome_out_file,
                                    problem="CGGHP",
                                    gurobi_log_file=gurobi_log_file,
                                    time_limit=7200)
Esempio n. 5
0
def do_test_job(input_directory, gurobi_log_file):
    logging.info(
        'Let\'s do comparison test for the DDP-ILP. Input directory is {0}'.
        format(input_directory))

    for path, name in get_immediate_subdirectories(input_directory):
        for subpath, subname in get_immediate_subdirectories(path):
            if os.path.isfile(subpath):
                continue

            logging.info("Working with directory {0}".format(subpath))
            ilppath = os.path.join(subpath, "ilp")

            ordinary_genome = os.path.join(ilppath, "target_genome.gen")
            all_dupl_genome = os.path.join(ilppath, "a.gen")
            out_file = os.path.join(ilppath, "result.txt")
            solve_double_distance_problem(ord_genome_file=ordinary_genome,
                                          all_dupl_genome_file=all_dupl_genome,
                                          out_result_file=out_file,
                                          gurobi_log_file=gurobi_log_file)