test_annotate_gct_from_mapping.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:psp 作者: cmap 项目源码 文件源码
def test_main(self):
        gct_path = os.path.join(functional_tests_dir, "test_annotate_gct_from_mapping_in.gct")
        mapping_path = os.path.join(functional_tests_dir, "test_annotate_gct_from_mapping.tsv")
        expected_gct_path = os.path.join(functional_tests_dir, "test_annotate_gct_from_mapping_expected.gct")
        out_path = os.path.join(functional_tests_dir, "test_annotate_gct_from_mapping_out.gct")

        args_string = "-i {} -m {} -o {} -f {}".format(
            gct_path, mapping_path, out_path, "pert_iname")
        args = agfm.build_parser().parse_args(args_string.split())

        agfm.main(args)

        # Read in expected and actual outputs
        e_gct = parse(expected_gct_path)
        out_gct = parse(out_path)

        pd.util.testing.assert_frame_equal(e_gct.data_df, out_gct.data_df)
        pd.util.testing.assert_frame_equal(e_gct.row_metadata_df, out_gct.row_metadata_df)
        pd.util.testing.assert_frame_equal(e_gct.col_metadata_df, out_gct.col_metadata_df)

        # Clean up
        os.remove(out_path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号