diff --git a/CHANGELOG.md b/CHANGELOG.md index 904e348f..fef97e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Pipeline Updates -- +- 🔧 Removed parameter `use_gpu`. Adding the `gpu` profile with `--profile gpu` is adequate to activate the GPU-based pathways [#520](https://github.com/nf-core/methylseq/pull/520) ## [v3.0.0](https://github.com/nf-core/methylseq/releases/tag/3.0.0) - [2024-12-16] diff --git a/README.md b/README.md index cf30cb9a..e3725502 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ On release, automated continuous integration tests run the pipeline on a full-si The pipeline allows you to choose between running either [Bismark](https://github.com/FelixKrueger/Bismark) or [bwa-meth](https://github.com/brentp/bwa-meth) / [MethylDackel](https://github.com/dpryan79/methyldackel). -Choose between workflows by using `--aligner bismark` (default, uses bowtie2 for alignment), `--aligner bismark_hisat` or `--aligner bwameth`. For higher performance, the pipeline can leverage the [Parabricks implementation of bwa-meth (fq2bammeth)](https://docs.nvidia.com/clara/parabricks/latest/documentation/tooldocs/man_fq2bam_meth.html), which implements the baseline tool `bwa-meth` in a performant method using fq2bam (BWA-MEM + GATK) as a backend for processing on GPU. To use this option, include the `--use_gpu` flag along with `--aligner bwameth`. +Choose between workflows by using `--aligner bismark` (default, uses bowtie2 for alignment), `--aligner bismark_hisat` or `--aligner bwameth`. For higher performance, the pipeline can leverage the [Parabricks implementation of bwa-meth (fq2bammeth)](https://docs.nvidia.com/clara/parabricks/latest/documentation/tooldocs/man_fq2bam_meth.html), which implements the baseline tool `bwa-meth` in a performant method using fq2bam (BWA-MEM + GATK) as a backend for processing on GPU. To use this option, include the `gpu` profile along with `--aligner bwameth`. | Step | Bismark workflow | bwa-meth workflow | | -------------------------------------------- | ------------------------ | --------------------- | diff --git a/docs/usage.md b/docs/usage.md index c750a6b3..08acbd77 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -34,7 +34,7 @@ bwa-meth aligner options: - Standard `bwa-meth` (CPU-based): This option can be invoked via `--aligner bwameth` and uses the traditional BWA-Meth aligner and runs on CPU processors. -- `Parabricks/FQ2BAMMETH` (GPU-based): For higher performance, the pipeline can leverage the [Parabricks implementation of bwa-meth (fq2bammeth)](https://docs.nvidia.com/clara/parabricks/latest/documentation/tooldocs/man_fq2bam_meth.html), which implements the baseline tool `bwa-meth` in a performant method using fq2bam (BWA-MEM + GATK) as a backend for processing on GPU. To use this option, include the `--use_gpu` flag along with `--aligner bwameth`. +- `Parabricks/FQ2BAMMETH` (GPU-based): For higher performance, the pipeline can leverage the [Parabricks implementation of bwa-meth (fq2bammeth)](https://docs.nvidia.com/clara/parabricks/latest/documentation/tooldocs/man_fq2bam_meth.html), which implements the baseline tool `bwa-meth` in a performant method using fq2bam (BWA-MEM + GATK) as a backend for processing on GPU. To use this option, include the `gpu` profile (as in `--profile gpu`) along with `--aligner bwameth`. ## Samplesheet input diff --git a/modules.json b/modules.json index af2a9655..dad1add5 100644 --- a/modules.json +++ b/modules.json @@ -156,7 +156,7 @@ }, "fastq_align_dedup_bwameth": { "branch": "master", - "git_sha": "bd5f75ccaf2345269810e66e85de8a70e4de8764", + "git_sha": "e55eae4a09b659522cf1b7898b5644fe06f66198", "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { diff --git a/nextflow.config b/nextflow.config index de859e8e..55127408 100644 --- a/nextflow.config +++ b/nextflow.config @@ -75,7 +75,6 @@ params { nomeseq = false // bwa-meth options - use_gpu = false min_depth = 0 ignore_flags = false methyl_kit = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 57849217..581043a4 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -380,12 +380,6 @@ "description": "", "default": "", "properties": { - "use_gpu": { - "type": "boolean", - "description": "Run Parabricks GPU-accelerated fq2bammeth module for alignment", - "default": false, - "fa_icon": "fas fa-dot-circle" - }, "min_depth": { "type": "integer", "description": "Specify a minimum read coverage for MethylDackel to report a methylation call.", diff --git a/subworkflows/nf-core/fastq_align_dedup_bwameth/main.nf b/subworkflows/nf-core/fastq_align_dedup_bwameth/main.nf index c0cc67b8..90488250 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bwameth/main.nf +++ b/subworkflows/nf-core/fastq_align_dedup_bwameth/main.nf @@ -17,6 +17,7 @@ workflow FASTQ_ALIGN_DEDUP_BWAMETH { ch_fasta_index // channel: [ val(meta), [ fasta index ] ] ch_bwameth_index // channel: [ val(meta), [ bwameth index ] ] skip_deduplication // boolean: whether to deduplicate alignments + use_gpu // boolean: whether to use GPU or CPU for bwameth alignment main: @@ -34,7 +35,7 @@ workflow FASTQ_ALIGN_DEDUP_BWAMETH { /* * Align with bwameth */ - if (params.use_gpu) { + if (use_gpu) { /* * Align with parabricks GPU enabled fq2bammeth implementation of bwameth */ diff --git a/subworkflows/nf-core/fastq_align_dedup_bwameth/meta.yml b/subworkflows/nf-core/fastq_align_dedup_bwameth/meta.yml index a66ea024..353d9322 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bwameth/meta.yml +++ b/subworkflows/nf-core/fastq_align_dedup_bwameth/meta.yml @@ -49,6 +49,10 @@ input: type: boolean description: | Skip deduplication of aligned reads + - use_gpu: + type: boolean + description: | + Use GPU for alignment output: - bam: type: file @@ -114,3 +118,4 @@ authors: - "@sateeshperi" maintainers: - "@sateeshperi" + - "@gallvp" diff --git a/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/gpu.nf.test b/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/gpu.nf.test index b156de6b..039bc4f0 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/gpu.nf.test +++ b/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/gpu.nf.test @@ -38,10 +38,6 @@ nextflow_workflow { test("Params: parabricks/fq2bammeth single-end | use_gpu") { when { - params { - skip_deduplication = false - use_gpu = true - } workflow { """ @@ -58,7 +54,8 @@ nextflow_workflow { file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.fai', checkIfExists: true) ]) input[3] = UNTAR.out.untar - input[4] = params.skip_deduplication + input[4] = false // skip_deduplication + input[5] = true // use_gpu """ } } @@ -105,7 +102,8 @@ nextflow_workflow { file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.fai', checkIfExists: true) ]) input[3] = UNTAR.out.untar - input[4] = params.skip_deduplication + input[4] = true // skip_deduplication + input[5] = true // use_gpu """ } } @@ -129,4 +127,4 @@ nextflow_workflow { } } -} +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test b/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test index 6b20d545..e644892d 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test @@ -37,10 +37,6 @@ nextflow_workflow { test("Params: bwameth single-end | default") { when { - params { - skip_deduplication = false - use_gpu = false - } workflow { """ @@ -57,7 +53,8 @@ nextflow_workflow { file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.fai', checkIfExists: true) ]) input[3] = UNTAR.out.untar - input[4] = params.skip_deduplication + input[4] = false // skip_deduplication + input[5] = false // use_gpu """ } } @@ -84,10 +81,6 @@ nextflow_workflow { test("Params: bwameth paired-end | default") { when { - params { - skip_deduplication = false - use_gpu = false - } workflow { """ @@ -105,7 +98,8 @@ nextflow_workflow { file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.fai', checkIfExists: true) ]) input[3] = UNTAR.out.untar - input[4] = params.skip_deduplication + input[4] = false // skip_deduplication + input[5] = false // use_gpu """ } } @@ -132,10 +126,6 @@ nextflow_workflow { test("Params: bwameth paired-end | skip_deduplication") { when { - params { - skip_deduplication = true - use_gpu = false - } workflow { """ @@ -153,7 +143,8 @@ nextflow_workflow { file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.fai', checkIfExists: true) ]) input[3] = UNTAR.out.untar - input[4] = params.skip_deduplication + input[4] = true // skip_deduplication + input[5] = false // use_gpu """ } } @@ -176,4 +167,4 @@ nextflow_workflow { ) } } -} +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test.snap index 90c96015..3a35462e 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_dedup_bwameth/tests/main.nf.test.snap @@ -35,7 +35,7 @@ ] ], [ - + ], [ [ @@ -110,7 +110,7 @@ ] ], [ - + ], [ [ @@ -122,7 +122,7 @@ ] ], [ - + ], [ "test.flagstat", @@ -182,7 +182,7 @@ ] ], [ - + ], [ [ @@ -221,4 +221,4 @@ }, "timestamp": "2024-11-17T05:42:39.183331191" } -} +} \ No newline at end of file diff --git a/tests/bwameth_use_gpu.nf.test b/tests/bwameth_use_gpu.nf.test index 9da5074b..61d30da8 100644 --- a/tests/bwameth_use_gpu.nf.test +++ b/tests/bwameth_use_gpu.nf.test @@ -11,7 +11,6 @@ nextflow_pipeline { params { input = "${projectDir}/assets/samplesheet_gpu.csv" aligner = "bwameth" // uses parabricks/fq2bammeth - use_gpu = true outdir = "$outputDir" } } diff --git a/workflows/methylseq/main.nf b/workflows/methylseq/main.nf index e4d2edf7..371903c5 100644 --- a/workflows/methylseq/main.nf +++ b/workflows/methylseq/main.nf @@ -120,6 +120,7 @@ workflow METHYLSEQ { ch_fasta_index, ch_bwameth_index, params.skip_deduplication || params.rrbs, + workflow.profile.tokenize(',').intersect(['gpu']).size() >= 1 ) ch_bam = FASTQ_ALIGN_DEDUP_BWAMETH.out.bam ch_bai = FASTQ_ALIGN_DEDUP_BWAMETH.out.bai