Пример #1
0
def test_AlleleColon_Emhaplofreq():
    
    exit_code = base.run_pypop_process('./tests/data/Test_Allele_Colon_Emhaplofreq.ini', './tests/data/Test_Allele_Colon_Emhaplofreq.pop')
    # check exit code
    assert exit_code == 0
    # compare with md5sum of output file
    assert hashlib.md5(open("Test_Allele_Colon_Emhaplofreq-out.txt", 'rb').read()).hexdigest() == '598954bfe301d5dea44ccd4d443905d1'
Пример #2
0
def test_USAFEL():
    exit_code = base.run_pypop_process('./tests/data/minimal.ini', './tests/data/USAFEL-UchiTelle-small.pop')
    # check exit code
    assert exit_code == 0

    out_filename = "USAFEL-UchiTelle-small-out.txt"
    gold_out_filename = os.path.join('./tests/data/output', out_filename)
    assert filecmp.cmp(out_filename, gold_out_filename)
Пример #3
0
def test_GenerateTSV():
    exit_code = base.run_pypop_process('./tests/data/WS_BDCtrl_Test_EM.ini', './tests/data/BIGDAWG_SynthControl_Data.pop', args=['--generate-tsv'])
    # check exit code
    assert exit_code == 0

    # compare with output files
    for out_filename in ['1-locus-allele.dat', '1-locus-pairwise-fnd.dat', '3-locus-summary.dat', '1-locus-genotype.dat', '1-locus-summary.dat', '4-locus-haplo.dat', '1-locus-hardyweinberg.dat', '3-locus-haplo.dat', '4-locus-summary.dat', 'BIGDAWG_SynthControl_Data-out.txt']:
        gold_out_filename = os.path.join('./tests/data/output', out_filename)
        assert filecmp.cmp(out_filename, gold_out_filename)
Пример #4
0
def test_USAFEL():
    exit_code = base.run_pypop_process(
        './tests/data/minimal.ini', './tests/data/USAFEL-UchiTelle-small.pop')
    # check exit code
    assert exit_code == 0

    out_filename = "USAFEL-UchiTelle-small-out.txt"
    gold_out_filename = os.path.join('./tests/data/output', out_filename)
    assert filecmp.cmp(out_filename, gold_out_filename)
Пример #5
0
def test_GenotypeCommon_HardyWeinberg():
    exit_code = base.run_pypop_process(
        './tests/data/WS_BDCtrl_Test_HW.ini',
        './tests/data/BIGDAWG_SynthControl_Data.pop')
    # check exit code
    assert exit_code == 0
    # compare with md5sum of output file
    assert hashlib.md5(
        open("BIGDAWG_SynthControl_Data-out.txt",
             'rb').read()).hexdigest() == 'db4bc1113e9eab337561f7510e73381f'
Пример #6
0
def test_GenotypeCommonDash_HardyWeinberg():
    exit_code = base.run_pypop_process(
        './tests/data/WS_BDCtrl_Test_HW.ini',
        './tests/data/BIGDAWG_SynthControl_Data_dash.pop')
    # check exit code
    assert exit_code == 0
    # compare with md5sum of output file
    assert hashlib.md5(
        open("BIGDAWG_SynthControl_Data_dash-out.txt",
             'rb').read()).hexdigest() == '36053392f9dd25c9a2a6bb1fc6db242a'
Пример #7
0
def test_GenerateTSV():
    exit_code = base.run_pypop_process(
        './tests/data/WS_BDCtrl_Test_EM.ini',
        './tests/data/BIGDAWG_SynthControl_Data.pop',
        args=['--generate-tsv'])
    # check exit code
    assert exit_code == 0

    # compare with output files
    for out_filename in [
            '1-locus-allele.dat', '1-locus-pairwise-fnd.dat',
            '3-locus-summary.dat', '1-locus-genotype.dat',
            '1-locus-summary.dat', '4-locus-haplo.dat',
            '1-locus-hardyweinberg.dat', '3-locus-haplo.dat',
            '4-locus-summary.dat', 'BIGDAWG_SynthControl_Data-out.txt'
    ]:
        gold_out_filename = os.path.join('./tests/data/output', out_filename)
        assert filecmp.cmp(out_filename, gold_out_filename)
Пример #8
0
def test_GenotypeCommon_HardyWeinberg():
    exit_code = base.run_pypop_process('./tests/data/WS_BDCtrl_Test_HW.ini', './tests/data/BIGDAWG_SynthControl_Data.pop')
    # check exit code
    assert exit_code == 0
    # compare with md5sum of output file
    assert hashlib.md5(open("BIGDAWG_SynthControl_Data-out.txt", 'rb').read()).hexdigest() == 'db4bc1113e9eab337561f7510e73381f'
Пример #9
0
def test_GenotypeCommonDash_HardyWeinberg():
    exit_code = base.run_pypop_process('./tests/data/WS_BDCtrl_Test_HW.ini', './tests/data/BIGDAWG_SynthControl_Data_dash.pop')
    # check exit code
    assert exit_code == 0
    # compare with md5sum of output file
    assert hashlib.md5(open("BIGDAWG_SynthControl_Data_dash-out.txt", 'rb').read()).hexdigest() == '36053392f9dd25c9a2a6bb1fc6db242a'
Пример #10
0
def test_100k_Emhaplofreq():
    exit_code = base.run_pypop_process(
        './tests/data/Test_100k_20loci_Dataset.ini',
        './tests/data/Test_100k_20loci_Dataset.pop')
    # check exit code
    assert exit_code == 0
Пример #11
0
def test_100k_Emhaplofreq():
    exit_code = base.run_pypop_process('./tests/data/Test_100k_20loci_Dataset.ini', './tests/data/Test_100k_20loci_Dataset.pop')
    # check exit code
    assert exit_code == 0
Пример #12
0
def test_AlleleColon_HardyWeinberg():
    exit_code = base.run_pypop_process('./tests/data/Test_Allele_Colon_HardyWeinberg.ini', './tests/data/Test_Allele_Colon_HardyWeinberg.pop')
    # check exit code
    assert exit_code == 0
    # compare with md5sum of output file
    assert hashlib.md5(open("Test_Allele_Colon_HardyWeinberg-out.txt", 'rb').read()).hexdigest() == '245a8a8493506c0b65ba9a3469173b13'