示例#1
0
文件: test_ds.py 项目: bedapub/roger
    def test_annotate_pheno_mismatching_counts(self):
        pheno_df = DataFrame()
        pheno_df['CellType'] = ["Microglia", "Macrophage"]
        pheno_df['Donor'] = ["Donor A", "Donor A"]

        exprs_data = parse_gct("test_data/ds/dummy/small.gct")
        with pytest.raises(ROGERUsageError):
            annotate_ds_pheno_data(exprs_data, pheno_df)
示例#2
0
文件: test_ds.py 项目: bedapub/roger
    def test_annotate_pheno_with_no_pheno(self):
        expected_df = DataFrame()
        expected_df['SAMPLE'] = ["A", "B", "C"]

        exprs_data = parse_gct("test_data/ds/dummy/small.gct")
        annotated_pheno = annotate_ds_pheno_data(exprs_data)
        assert_frame_equal(annotated_pheno, expected_df)
示例#3
0
文件: test_ds.py 项目: bedapub/roger
    def test_annotate_pheno_witn_simple_pheno(self):
        pheno_df = DataFrame()
        pheno_df['CellType'] = ["Microglia", "Macrophage", "Macrophage"]
        pheno_df['Donor'] = ["Donor A", "Donor A", "Donor A"]

        expected_df = DataFrame()
        expected_df['SAMPLE'] = ["A", "B", "C"]
        expected_df['CellType'] = ["Microglia", "Macrophage", "Macrophage"]
        expected_df['Donor'] = ["Donor A", "Donor A", "Donor A"]

        exprs_data = parse_gct("test_data/ds/dummy/small.gct")
        annotated_pheno = annotate_ds_pheno_data(exprs_data, pheno_df)
        assert_frame_equal(annotated_pheno, expected_df)