예제 #1
0
파일: test_snps.py 프로젝트: sadikmu/mgkit
def test_combine_sample_snps_index3():
    # check index_type
    df = combine_sample_snps(
        SNP_DATA,
        1,
        [lambda x: x],
        index_type='taxon'
    )
    assert df.index.tolist() == [838, 839]
예제 #2
0
파일: test_snps.py 프로젝트: sadikmu/mgkit
def test_combine_sample_snps_index2():
    # check index_type
    df = combine_sample_snps(
        SNP_DATA,
        1,
        [lambda x: x],
        index_type='gene'
    )
    # Can't expect the list to be sorted
    assert sorted(df.index.tolist()) == ['gene1', 'gene2', 'gene3']
예제 #3
0
파일: test_snps.py 프로젝트: sadikmu/mgkit
def test_combine_sample_snps_index1():
    # check index_type
    df = combine_sample_snps(SNP_DATA, 1, [lambda x: x])
    assert df.index.tolist() == [('gene1', 839), ('gene2', 838), ('gene3', 838)]
예제 #4
0
파일: test_snps.py 프로젝트: sadikmu/mgkit
def test_combine_sample_snps_values():
    # check if values are correct is working
    df = combine_sample_snps(SNP_DATA, 1, [lambda x: x])
    assert (df.min().min(), df.max().max()) == (0.5, 1.)
예제 #5
0
파일: test_snps.py 프로젝트: sadikmu/mgkit
def test_combine_sample_snps_min_num2():
    # check if min_num is working
    df = combine_sample_snps(SNP_DATA, 2, [lambda x: x])
    assert df.shape == (2, 2)
예제 #6
0
파일: test_snps.py 프로젝트: sadikmu/mgkit
def test_combine_sample_min_num1():
    # check if min_num is working
    df = combine_sample_snps(SNP_DATA, 1, [lambda x: x])
    df.shape == (3, 2)