From e1f7f61b9795ed8482918757ec3088cc7e1f9734 Mon Sep 17 00:00:00 2001 From: Venkat Malladi <venkat.malladi@utsouthwestern.edu> Date: Sun, 6 Jan 2019 21:14:55 -0600 Subject: [PATCH] Add summits and remove extra names in files. --- workflow/main.nf | 1 + workflow/scripts/call_peaks_macs.py | 2 +- workflow/tests/test_call_peaks_macs.py | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/workflow/main.nf b/workflow/main.nf index 3bd2edf..ac29389 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -342,6 +342,7 @@ process callPeaksMACS { output: set sampleId, file('*.narrowPeak'), file('*.fc_signal.bw'), file('*.pvalue_signal.bw'), experimentId, biosample, factor, treatment, replicate, controlId into experimentPeaks + file '*.xls' into summit script: diff --git a/workflow/scripts/call_peaks_macs.py b/workflow/scripts/call_peaks_macs.py index 23174e0..28c546c 100644 --- a/workflow/scripts/call_peaks_macs.py +++ b/workflow/scripts/call_peaks_macs.py @@ -125,7 +125,7 @@ def call_peaks_macs(experiment, xcor, control, prefix, genome_size, chrom_sizes) # MACS2 sometimes calls features off the end of chromosomes. # Remove coordinates outside chromosome sizes - narrowpeak_fn = '%s_peaks.narrowPeak' % (prefix) + narrowpeak_fn = '%s.narrowPeak' % (prefix) clipped_narrowpeak_fn = 'clipped-%s' % (narrowpeak_fn) diff --git a/workflow/tests/test_call_peaks_macs.py b/workflow/tests/test_call_peaks_macs.py index 71358bc..dabfd71 100644 --- a/workflow/tests/test_call_peaks_macs.py +++ b/workflow/tests/test_call_peaks_macs.py @@ -12,7 +12,8 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ def test_call_peaks_macs_singleend(): assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.fc_signal.bw')) assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.pvalue_signal.bw')) - peak_file = test_output_path + 'ENCLB144FDT_peaks.narrowPeak' + assert os.path.exists(os.path.join(test_output_path, 'ENCLB144FDT.xls')) + peak_file = test_output_path + 'ENCLB144FDT.narrowPeak' assert utils.count_lines(peak_file) == 227389 @@ -20,5 +21,6 @@ def test_call_peaks_macs_singleend(): def test_call_peaks_macs_pairedend(): assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX.fc_signal.bw')) assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX.pvalue_signal.bw')) - peak_file = test_output_path + 'ENCLB568IYX_peaks.narrowPeak' + assert os.path.exists(os.path.join(test_output_path, 'ENCLB568IYX.xls')) + peak_file = test_output_path + 'ENCLB568IYX.narrowPeak' assert utils.count_lines(peak_file) == 112652 -- GitLab