def assert_gwas_2(unit_test, gwas):
expected_snp = pandas.Series(["rsC", "rs1666", "rs1", "rs2", "rs4", "rsB", "rsA", "rs7666", "rs8", "rs9"], dtype=numpy.str)
numpy.testing.assert_array_equal(gwas[SNP], expected_snp)
expected_effect = pandas.Series(["T", "A", "C", "C", "A", "G", "G", "A", "A", "A"], dtype=numpy.str)
numpy.testing.assert_array_equal(gwas[EFFECT_ALLELE], expected_effect)
expected_non_effect = pandas.Series(["C", "G", "T", "T", "G", "A", "A", "G", "G", "G"], dtype=numpy.str)
numpy.testing.assert_array_equal(gwas[NON_EFFECT_ALLELE], expected_non_effect)
expected_zscore = pandas.Series([4.35, 0.3, -0.2, 1.3, -0.3, 2.9, 1.3, 1.3, 0.09, 0.09], dtype=numpy.float32)
numpy.testing.assert_allclose(gwas[ZSCORE], expected_zscore, rtol=0.001)
expected_chromosome = pandas.Series(["chr1", "chr1", "chr1", "chr1", "chr1", "chr1", "chr1", "chr1", "chr1", "chr1"], dtype=numpy.str)
numpy.testing.assert_array_equal(gwas[CHROMOSOME], expected_chromosome)
expected_position = pandas.Series([None, None, None, None, None, None, None, None, None, None])
numpy.testing.assert_array_equal(gwas[POSITION], expected_position)
评论列表
文章目录