diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d2c02bafa267b607097ebe73283d3b4e6a24c89..fa19e089d424bfcda57f6a7cfedcf58c09d1a90b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ before_script: stages: - unit + - skip - single - multiple @@ -62,3 +63,15 @@ paired_end_diff: - pytest -m paireddiff artifacts: expire_in: 2 days + +single_end_skip: + stage: skip + only: + - branches + except: + - master + script: + - nextflow run workflow/main.nf --designFile "$CI_PROJECT_DIR/test_data/design_diff_SE.txt" --genome 'GRCm38' --skipDiff true --skipMotif true -resume + - pytest -m singleskip_true + artifacts: + expire_in: 2 days diff --git a/workflow/main.nf b/workflow/main.nf index a8c50272131ced87f134cf63241032ceddda2f98..f06ebc0eb4bffb675a2d42bd9841d66337274fee 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -17,6 +17,8 @@ params.cutoffRatio = 1.2 params.outDir= "$baseDir/output" params.extendReadsLen = 100 params.topPeakCount = 600 +params.skipDiff = false +params.skipMotif = false // Check inputs if( params.bwaIndex ){ @@ -45,6 +47,8 @@ cutoffRatio = params.cutoffRatio outDir = params.outDir extendReadsLen = params.extendReadsLen topPeakCount = params.topPeakCount +skipDiff = params.skipDiff +skipMotif = params.skipMotif // Check design file for errors process checkDesignFile { @@ -427,6 +431,9 @@ process motifSearch { file "*memechip" into motifSearch file "*narrowPeak" into filteredPeaks + when: + !skipMotif + script: """ @@ -456,7 +463,7 @@ process diffPeaks { file 'normcount_peaksets.txt' into normCountPeaks when: - noUniqueExperiments > 1 + noUniqueExperiments > 1 && !skipDiff script: """ diff --git a/workflow/tests/test_annotate_peaks.py b/workflow/tests/test_annotate_peaks.py index ee3ebe12983b82607d7f3fe5559869633a7a8a72..1342a125db90619ff19838d7cfb5c8c1be7b9d69 100644 --- a/workflow/tests/test_annotate_peaks.py +++ b/workflow/tests/test_annotate_peaks.py @@ -19,6 +19,7 @@ def test_pie_singleend(): def test_upsetplot_singleend(): assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_upsetplot.pdf')) + @pytest.mark.singleend def test_annotation_singleend(): annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.tsv' diff --git a/workflow/tests/test_diff_peaks.py b/workflow/tests/test_diff_peaks.py index b0a76aaece94d6b795efee271ffd64404da8ad92..8782f21065f387c18f1b58fcf7051d6222abc7f5 100644 --- a/workflow/tests/test_diff_peaks.py +++ b/workflow/tests/test_diff_peaks.py @@ -10,14 +10,16 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ '/../output/diffPeaks/' -@pytest.mark.singleend +@pytest.mark.singleskip_true def test_diff_peaks_singleend_single_rep(): assert os.path.isdir(test_output_path) == False + @pytest.mark.pairedend def test_diff_peaks_pairedend_single_rep(): assert os.path.isdir(test_output_path) == False + @pytest.mark.singlediff def test_heatmap_singleend_multiple_rep(): assert os.path.exists(os.path.join(test_output_path, 'heatmap.pdf')) diff --git a/workflow/tests/test_motif_search.py b/workflow/tests/test_motif_search.py index 8c1265211b87da7d006b9020087ce04994889fd0..28aec0466d45ae1bf1185b5696b1c5fb669ef1c6 100644 --- a/workflow/tests/test_motif_search.py +++ b/workflow/tests/test_motif_search.py @@ -23,13 +23,18 @@ def test_motif_search_singleend(): assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC_memechip', 'index.html')) +@pytest.mark.singleskip_true +def test_motif_search_singleend(): + assert os.path.isdir(test_output_path) == False + + @pytest.mark.pairedend def test_limited_peaks_pairedend(): peak_file_ENCSR729LGA= test_output_path + 'ENCSR729LGA.600.narrowPeak' assert os.path.exists(peak_file_ENCSR729LGA) assert utils.count_lines(peak_file_ENCSR729LGA) == 600 - + @pytest.mark.pairedend def test_motif_search_pairedend(): assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA_memechip', 'ENCSR729LGA.fa'))