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_post_idr_plot(): i_files, p_files, pp_files = _get_idr_set() idr_plotter = idr.idr_plotter(idr_plotter_path) out_files = idr.plot_idr_output(i_files, p_files, pp_files, idr_plotter) assert all(map(idr.file_exists, list(idr.flatten(out_files))))