def assert_gwas_1(unit_test, gwas):
expected_snp = pandas.Series(["rs1666", "rs1", "rs2", "rs3", "rs4", "rs6", "rs7", "rs7666", "rs8", "rs9"], dtype=numpy.str)
numpy.testing.assert_array_equal(gwas[SNP], expected_snp)
expected_effect = pandas.Series(["A", "C", "C", "G", "A", "G", "T", "A", "A", "A"], dtype=numpy.str)
numpy.testing.assert_array_equal(gwas[EFFECT_ALLELE], expected_effect)
expected_non_effect = pandas.Series(["G", "T", "T", "A", "G", "A", "C", "G", "G", "G"], dtype=numpy.str)
numpy.testing.assert_array_equal(gwas[NON_EFFECT_ALLELE], expected_non_effect)
expected_zscore = pandas.Series([0.3, -0.2, 0.5, 1.3, -0.3, 2.9, 4.35, 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([0, 1, 5, 20, 30, 42, 43, 45, 50, 70])
numpy.testing.assert_array_equal(gwas[POSITION], expected_position)
评论列表
文章目录