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]
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']
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)]
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.)
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)
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)