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)
评论列表
文章目录