def test_run_idr(): individual_peaks = glob.glob(os.path.join(peak_dir, 'ctcf_[0-9]_VS_*.gz')) individual_peaks = map(_copy_file_to_testdir, individual_peaks) pseudo_peaks = glob.glob(os.path.join(peak_dir, 'ctcf_[0-9]_[0-9]_VS_*.gz')) pseudo_peaks = map(_copy_file_to_testdir, pseudo_peaks) pseudo_peaks.sort() pseudo_peaks = idr.bunch(pseudo_peaks) pooled_pseudo = glob.glob(os.path.join(peak_dir, 'ctcf_0_pooled_[0-9]_VS_*.gz')) pooled_pseudo = map(_copy_file_to_testdir, pooled_pseudo) idr_runner = idr.idr_runner(idr_runner_path) indiv, pseudo, pool_pseudo = idr.run_idr(individual_peaks, pseudo_peaks, pooled_pseudo, idr_runner) assert all(map(idr.file_exists, indiv)) assert all(map(idr.file_exists, list(idr.flatten(pooled_pseudo)))) assert all(map(idr.file_exists, pool_pseudo))
def test_idr_runner(): tmp_peak_files = map(_copy_file_to_testdir, peak_files) idr_runner = idr.idr_runner(idr_runner_path) idr_out = idr_runner(tmp_peak_files) assert idr.file_exists(idr_out)