From a5928f13aa98725cfa93a27e2e735f9cffe438e5 Mon Sep 17 00:00:00 2001 From: Jeremy Mathews <Jeremy.Mathews@utsouthwestern.edu> Date: Mon, 15 Jul 2019 16:50:38 -0500 Subject: [PATCH] add plot profile test. output to experiment QC folder --- workflow/main.nf | 4 ++-- workflow/tests/test_plot_profile.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 workflow/tests/test_plot_profile.py diff --git a/workflow/main.nf b/workflow/main.nf index ed2c9e8..a6f486f 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -463,7 +463,7 @@ peaksDesign = experimentPeaks //plotProfile process plotProfile { - publishDir "$outDir/${task.process}", mode: 'copy' + publishDir "$outDir/experimentQC", mode: 'copy' input: @@ -472,7 +472,7 @@ process plotProfile { output: - file("*.png") into plotProfile + file(".{png,gz}") into plotProfile when: diff --git a/workflow/tests/test_plot_profile.py b/workflow/tests/test_plot_profile.py new file mode 100644 index 0000000..6c9605d --- /dev/null +++ b/workflow/tests/test_plot_profile.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import pytest +import os +import utils + +test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ + '/../output/experimentQC/' + + +@pytest.mark.singleend +def test_plot_singleend(): + assert os.path.exists(os.path.join(test_output_path, 'plotProfile.png')) + + +@pytest.mark.pairedend +def test_plot_pairedend(): + assert os.path.exists(os.path.join(test_output_path, 'computeMatrix.gz')) -- GitLab