def test_first_example(): with tempfile.TemporaryDirectory() as temp_dir1: args1 = ('tests/inputs/haplotype_file01.txt', 'ms02g', [ ('MA605:PI', 'MA605:PG_al') ], [('Sp21:PI', 'Sp21:PG_al')], 'pat_hap', 'mat_hap', temp_dir1, '', 1, 3, 'max sum', '+', 'no') phase_stich(*args1) assert is_same_dir('tests/outdir/egout1/', temp_dir1) is True
def test_second_example(): with tempfile.TemporaryDirectory() as temp_dir1: args2 = ('tests/inputs/haplotype_file01.txt', 'ms02g', [ ('MA605:PI', 'MA605:PG_al'), ('MA622:PI', 'MA622:PG_al') ], [('Sp21:PI', 'Sp21:PG_al'), ('Sp164:PI', 'Sp164:PG_al')], 'Sp_hap', 'My_hap', temp_dir1, '', 2, 3, 'max sum', '+', 'no') phase_stich(*args2) assert is_same_dir('tests/outdir/egout2', temp_dir1) is True
def test_fourth_example(): with tempfile.TemporaryDirectory() as temp_dir1: args4 = ('tests/inputs/haplotype_file02.txt', 'ms02g', [ ('MA611:PI', 'MA611:PG_al'), ('MA625:PI', 'MA625:PG_al'), ('Ncm8:PI', 'Ncm8:PG_al'), ('MA622:PI', 'MA622:PG_al'), ('MA629:PI', 'MA629:PG_al'), ('MA605:PI', 'MA605:PG_al') ], [ ('Sp154:PI', 'Sp154:PG_al'), ('Sp164:PI', 'Sp164:PG_al'), ('Sp76:PI', 'Sp76:PG_al'), ('Sp21:PI', 'Sp21:PG_al'), ('SpNor33:PI', 'SpNor33:PG_al'), ('Sp3:PI', 'Sp3:PG_al') ], 'Sp_hap', 'My_hap', temp_dir1, '', 1, 25, 'max product', '*', 'yes') phase_stich(*args4) assert is_same_dir('tests/outdir/egout4', temp_dir1) is True
def main(): parser = argparse.ArgumentParser() args = get_args(parser) parsed_args = args_to_values(args) print_authorship() phase_stich(*parsed_args)