From 210199e4ea1740cd6c81b42794764f4ae68fdde4 Mon Sep 17 00:00:00 2001 From: Sateesh Date: Mon, 2 Dec 2024 12:04:57 +0000 Subject: [PATCH] add fq2bammeth config + test + snap, ci: nf-test job filter by tag cpu --- conf/modules/bwameth_align.config | 2 +- conf/modules/parabricks_fq2bammeth.config | 12 +++++ .../fastq_align_dedup_bwameth.config | 1 + tests/bismark_emseq_clip_r1.nf.test | 1 + tests/bwameth.nf.test | 1 + tests/bwameth_use_gpu.nf.test | 7 ++- tests/bwameth_use_gpu.nf.test.snap | 49 +++++-------------- tests/nextflow.config | 4 -- 8 files changed, 31 insertions(+), 46 deletions(-) create mode 100644 conf/modules/parabricks_fq2bammeth.config diff --git a/conf/modules/bwameth_align.config b/conf/modules/bwameth_align.config index 420a6646..bc4ab758 100644 --- a/conf/modules/bwameth_align.config +++ b/conf/modules/bwameth_align.config @@ -1,6 +1,6 @@ process { withName: BWAMETH_ALIGN { - cache = 'lenient' + cache = 'lenient' // This is set because in the module command the index files are touched so as to have bwameth not complain ext.args = '' publishDir = [ path: { "${params.outdir}/${params.aligner}/alignments" }, diff --git a/conf/modules/parabricks_fq2bammeth.config b/conf/modules/parabricks_fq2bammeth.config new file mode 100644 index 00000000..71e2596a --- /dev/null +++ b/conf/modules/parabricks_fq2bammeth.config @@ -0,0 +1,12 @@ +process { + withName: PARABRICKS_FQ2BAMMETH { + cache = 'lenient' // This is set because in the module command the index files are touched so as to have bwameth not complain + ext.args = '--low-memory' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/alignments" }, + pattern: "*.bam", + mode: params.publish_dir_mode, + enabled: params.save_align_intermeds + ] + } +} diff --git a/conf/subworkflows/fastq_align_dedup_bwameth.config b/conf/subworkflows/fastq_align_dedup_bwameth.config index c68bf509..fec290d8 100644 --- a/conf/subworkflows/fastq_align_dedup_bwameth.config +++ b/conf/subworkflows/fastq_align_dedup_bwameth.config @@ -1,5 +1,6 @@ includeConfig "../modules/bwameth_align.config" +includeConfig "../modules/parabricks_fq2bammeth.config" includeConfig "../modules/samtools_sort.config" includeConfig "../modules/samtools_flagstat.config" includeConfig "../modules/samtools_stats.config" diff --git a/tests/bismark_emseq_clip_r1.nf.test b/tests/bismark_emseq_clip_r1.nf.test index c1bc57a0..0f2bc92a 100644 --- a/tests/bismark_emseq_clip_r1.nf.test +++ b/tests/bismark_emseq_clip_r1.nf.test @@ -3,6 +3,7 @@ nextflow_pipeline { name "Test Workflow main.nf" script "../main.nf" config "./nextflow.config" + tag "cpu" test("Params: bismark | em_seq | clip_r1") { when { diff --git a/tests/bwameth.nf.test b/tests/bwameth.nf.test index 3ed5c859..373f2a99 100644 --- a/tests/bwameth.nf.test +++ b/tests/bwameth.nf.test @@ -3,6 +3,7 @@ nextflow_pipeline { name "Test Workflow main.nf" script "../main.nf" config "./nextflow.config" + tag "cpu" test("Params: bwameth") { when { diff --git a/tests/bwameth_use_gpu.nf.test b/tests/bwameth_use_gpu.nf.test index ff35aaa5..d3f50457 100644 --- a/tests/bwameth_use_gpu.nf.test +++ b/tests/bwameth_use_gpu.nf.test @@ -3,7 +3,6 @@ nextflow_pipeline { name "Test Workflow main.nf" script "../main.nf" config "./nextflow.config" - tag "gpu" test("Params: bwameth | use_gpu") { @@ -41,12 +40,12 @@ nextflow_pipeline { } } - test("Params: bwameth | use_gpu | with bwameth-index") { + test("Params: bwameth | use_gpu |with bwameth-index") { when { params { - aligner = "bwameth" + aligner = "bwameth" bwameth_index = "https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bwameth_Index.tar.gz" - outdir = "$outputDir" + outdir = "$outputDir" } } diff --git a/tests/bwameth_use_gpu.nf.test.snap b/tests/bwameth_use_gpu.nf.test.snap index 78c4f399..cf54e1e8 100644 --- a/tests/bwameth_use_gpu.nf.test.snap +++ b/tests/bwameth_use_gpu.nf.test.snap @@ -1,4 +1,14 @@ { + "Params: bwameth | use_gpu |with bwameth-index": { + "content": [ + 47 + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-12-02T11:56:58.163433" + }, "Params: bwameth | use_gpu": { "content": [ 36, @@ -164,13 +174,6 @@ "multiqc/bwameth/multiqc_plots/svg/samtools_alignment_plot-cnt.svg", "multiqc/bwameth/multiqc_plots/svg/samtools_alignment_plot-pct.svg", "multiqc/bwameth/multiqc_report.html", - "parabricks", - "parabricks/SRR389222_sub1.bam", - "parabricks/SRR389222_sub1.bam.bai", - "parabricks/SRR389222_sub2.bam", - "parabricks/SRR389222_sub2.bam.bai", - "parabricks/SRR389222_sub3.bam", - "parabricks/SRR389222_sub3.bam.bai", "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", "trimgalore", @@ -223,13 +226,7 @@ "samtools-flagstat-dp_Percentage_of_total.txt:md5,921b0c969e7c154c0cd18b331e2a6c1c", "samtools-flagstat-dp_Read_counts.txt:md5,c0764320e38e62b48d59f608094804b8", "samtools-stats-dp.txt:md5,99418ae30d5855a3d8cd9cfdf21dd14d", - "samtools_alignment_plot.txt:md5,34b8fa8a88b6f5ef00153b07aabc028d", - "SRR389222_sub1.bam:md5,a5d5600e09697b1d9a31b0547ab7edcf", - "SRR389222_sub1.bam.bai:md5,c95cb45c3f0a9a82bf78a7914b38ebaf", - "SRR389222_sub2.bam:md5,bb04f6c07f75892530c7d960997ac9a7", - "SRR389222_sub2.bam.bai:md5,fbe5ef44841a8b6028bdb7c14ae67e59", - "SRR389222_sub3.bam:md5,2c1cca453526e1672e87bb07e30af30a", - "SRR389222_sub3.bam.bai:md5,d7d62a85aac95328011ba48c37f3cf1c" + "samtools_alignment_plot.txt:md5,34b8fa8a88b6f5ef00153b07aabc028d" ], [ [ @@ -255,18 +252,6 @@ [ "SRR389222_sub3.markdup.sorted.bam", "9eaa07df5ad58a78ab57ee55f948a044" - ], - [ - "SRR389222_sub1.bam", - "97e6767c5ddea54cb2a6498192a09c68" - ], - [ - "SRR389222_sub2.bam", - "313ae71af4023059a295ed8a132fd9ad" - ], - [ - "SRR389222_sub3.bam", - "9eaa07df5ad58a78ab57ee55f948a044" ] ] ], @@ -274,16 +259,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-12-02T08:58:09.474824" - }, - "Params: bwameth | use_gpu | with bwameth-index": { - "content": [ - 47 - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-12-02T08:59:21.276625" + "timestamp": "2024-12-02T11:55:47.061799" } } diff --git a/tests/nextflow.config b/tests/nextflow.config index c1495884..687ba08a 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -28,10 +28,6 @@ process { withName: PRESEQ_LCEXTRAP { errorStrategy = 'ignore' } - - withName: 'PARABRICKS_FQ2BAMMETH' { - ext.args = '--low-memory' - } } // Impose same minimum Nextflow version as the pipeline for testing