def test_parse_heatmap_values(testdir, mock_testclass): sample_splits = ['POLR2A-100-110', 'POLR2A-120-130'] output_folder = str(testdir) copyfile( Path(__file__).parent.joinpath('ind_data_POLR2A-100-110.txt'), 'ind_data_POLR2A-100-110.txt') copyfile( Path(__file__).parent.joinpath('ind_data_POLR2A-120-130.txt'), 'ind_data_POLR2A-120-130.txt') heatmap = v.parse_heatmap_values(sample_splits, output_folder) for split in sample_splits: assert split in heatmap assert 'YCR088W' in heatmap['POLR2A-100-110'] assert heatmap['POLR2A-100-110']['YCR088W'] == '1.2' assert 'YMR282C' in heatmap['POLR2A-100-110'] assert heatmap['POLR2A-100-110']['YMR282C'] == '2.408' assert 'YOR374W' in heatmap['POLR2A-100-110'] assert heatmap['POLR2A-100-110']['YOR374W'] == '0.34' assert 'YPR185W' in heatmap['POLR2A-100-110'] assert heatmap['POLR2A-100-110']['YPR185W'] == '0.978' assert 'YPL259C' in heatmap['POLR2A-100-110'] assert heatmap['POLR2A-100-110']['YPL259C'] == '1.5883' assert 'YER107C' in heatmap['POLR2A-120-130'] assert heatmap['POLR2A-120-130']['YER107C'] == '1.32' assert 'YEL056W' in heatmap['POLR2A-120-130'] assert heatmap['POLR2A-120-130']['YEL056W'] == '1.9516' assert 'YNL037C' in heatmap['POLR2A-120-130'] assert heatmap['POLR2A-120-130']['YNL037C'] == '0' assert 'YDR017C' in heatmap['POLR2A-120-130'] assert heatmap['POLR2A-120-130']['YDR017C'] == '0.832' assert 'YKL186C' in heatmap['POLR2A-120-130'] assert heatmap['POLR2A-120-130']['YKL186C'] == '0.224'
def test_parse_heatmap_values_noheatmapfiles(testdir, mock_testclass): sample_splits = ['POLR2A-100-110', 'POLR2A-120-130'] output_folder = str(os.curdir) with pytest.raises(AssertionError): v.parse_heatmap_values(sample_splits, output_folder)