diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/main.nf b/subworkflows/nf-core/fastq_align_dedup_bwamem/main.nf old mode 100644 new mode 100755 index 026bbf6f7a6a..83dbfb3bf1e1 --- a/subworkflows/nf-core/fastq_align_dedup_bwamem/main.nf +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/main.nf @@ -1,6 +1,8 @@ -include { FASTQ_ALIGN_BWA } from '../fastq_align_bwa/main' +include { BAM_SORT_STATS_SAMTOOLS } from '../../nf-core/bam_sort_stats_samtools/main' +include { FASTQ_ALIGN_BWA } from '../../nf-core/fastq_align_bwa/main' include { PICARD_ADDORREPLACEREADGROUPS } from '../../../modules/nf-core/picard/addorreplacereadgroups/main' include { PICARD_MARKDUPLICATES } from '../../../modules/nf-core/picard/markduplicates/main' +include { PARABRICKS_FQ2BAM } from '../../../modules/nf-core/parabricks/fq2bam/main' include { SAMTOOLS_INDEX } from '../../../modules/nf-core/samtools/index/main' workflow FASTQ_ALIGN_DEDUP_BWAMEM { @@ -11,29 +13,61 @@ workflow FASTQ_ALIGN_DEDUP_BWAMEM { ch_fasta_index // channel: [ val(meta), [ fasta index ] ] ch_bwamem_index // channel: [ val(meta), [ bwamem index ] ] skip_deduplication // boolean: whether to deduplicate alignments + use_gpu // boolean: whether to use GPU accelerated alignment + output_fmt // string: output format for parabricks fq2bam (e.g., 'bam' or 'cram') + interval_file // channel: [ val(meta), [ interval file ] ] + known_sites // channel: [ val(meta), [ known sites ] ] main: - ch_alignment = channel.empty() - ch_alignment_index = channel.empty() - ch_flagstat = channel.empty() - ch_stats = channel.empty() - ch_idxstats = channel.empty() - ch_picard_metrics = channel.empty() - ch_multiqc_files = channel.empty() - ch_versions = channel.empty() - FASTQ_ALIGN_BWA ( - ch_reads, - ch_bwamem_index, - true, // val_sort_bam hardcoded to true - ch_fasta - ) - ch_alignment = FASTQ_ALIGN_BWA.out.bam // channel: [ val(meta), [ bam ] ] + ch_alignment = channel.empty() + ch_alignment_index = channel.empty() + ch_flagstat = channel.empty() + ch_stats = channel.empty() + ch_idxstats = channel.empty() + ch_picard_metrics = channel.empty() + ch_multiqc_files = channel.empty() + ch_versions = channel.empty() + if (use_gpu) { + /* + * Align with parabricks GPU enabled fq2bam implementation of bwa-mem + */ + PARABRICKS_FQ2BAM ( + ch_reads, // channel: [ val(meta), [ reads ] ] + ch_fasta, // channel: [ val(meta), [ fasta ] ] + ch_bwamem_index, // channel: [ val(meta), [ bwamem index ] ] + interval_file, // channel: [ val(meta), [ interval file ] ] + known_sites, // channel: [ val(meta), [ known sites ] ] + output_fmt // string: output format + ) + ch_alignment = PARABRICKS_FQ2BAM.out.bam + ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions.first()) + + BAM_SORT_STATS_SAMTOOLS ( + ch_alignment, + ch_fasta + ) + ch_alignment = BAM_SORT_STATS_SAMTOOLS.out.bam + ch_alignment_index = BAM_SORT_STATS_SAMTOOLS.out.bai + ch_stats = BAM_SORT_STATS_SAMTOOLS.out.stats // channel: [ val(meta), path(stats) ] + ch_flagstat = BAM_SORT_STATS_SAMTOOLS.out.flagstat // channel: [ val(meta), path(flagstat) ] + ch_idxstats = BAM_SORT_STATS_SAMTOOLS.out.idxstats // channel: [ val(meta), path(idxstats) ] + ch_versions = ch_versions.mix(BAM_SORT_STATS_SAMTOOLS.out.versions.first()) + } + else { + FASTQ_ALIGN_BWA ( + ch_reads, + ch_bwamem_index, + true, // val_sort_bam hardcoded to true + ch_fasta + ) + ch_alignment = FASTQ_ALIGN_BWA.out.bam // channel: [ val(meta), [ bam ] ] ch_alignment_index = FASTQ_ALIGN_BWA.out.bai // channel: [ val(meta), [ bai ] ] - ch_stats = FASTQ_ALIGN_BWA.out.stats // channel: [ val(meta), path(stats) ] - ch_flagstat = FASTQ_ALIGN_BWA.out.flagstat // channel: [ val(meta), path(flagstat) ] - ch_idxstats = FASTQ_ALIGN_BWA.out.idxstats // channel: [ val(meta), path(idxstats) ] - ch_versions = ch_versions.mix(FASTQ_ALIGN_BWA.out.versions.first()) + ch_stats = FASTQ_ALIGN_BWA.out.stats // channel: [ val(meta), path(stats) ] + ch_flagstat = FASTQ_ALIGN_BWA.out.flagstat // channel: [ val(meta), path(flagstat) ] + ch_idxstats = FASTQ_ALIGN_BWA.out.idxstats // channel: [ val(meta), path(idxstats) ] + ch_versions = ch_versions.mix(FASTQ_ALIGN_BWA.out.versions.first()) + } if (!skip_deduplication) { /* @@ -85,4 +119,4 @@ workflow FASTQ_ALIGN_DEDUP_BWAMEM { picard_metrics = ch_picard_metrics // channel: [ val(meta), [ metrics ] ] multiqc = ch_multiqc_files // channel: [ *{html,txt} ] versions = ch_versions // channel: [ versions.yml ] -} +} diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/meta.yml b/subworkflows/nf-core/fastq_align_dedup_bwamem/meta.yml old mode 100644 new mode 100755 index fd6670e2af03..d38dae813b04 --- a/subworkflows/nf-core/fastq_align_dedup_bwamem/meta.yml +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/meta.yml @@ -1,6 +1,7 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_align_dedup_bwamem" -description: Performs alignment of DNA or TAPS-treated reads using bwamem, sort and deduplicate +description: Performs alignment of DNA or TAPS-treated reads using bwamem or + parabricks/fq2bam, sort and deduplicate keywords: - bwamem - alignment @@ -11,9 +12,11 @@ keywords: - fastq - bam components: + - parabricks/fq2bam - samtools/index - picard/addorreplacereadgroups - picard/markduplicates + - bam_sort_stats_samtools - fastq_align_bwa input: - ch_reads: @@ -41,6 +44,24 @@ input: type: boolean description: | Skip deduplication of aligned reads + - use_gpu: + type: boolean + description: | + Use GPU for alignment + - output_fmt: + type: string + description: Output format for the alignment. Options are 'bam' or 'cram' + pattern: "{bam,cram}" + - interval_file: + type: file + description: | + Structure: [ val(meta), path(interval file) ] + pattern: "*.{bed,intervals}" + - known_sites: + type: file + description: | + Structure: [ val(meta), path(known sites) ] + pattern: "*.{vcf,vcf.gz}" output: - bam: type: file @@ -84,12 +105,6 @@ output: Channel containing files for MultiQC input (metrics, stats, flagstat, idxstats). Structure: [ path(file) ] pattern: "*{.txt,.stats,.flagstat,.idxstats}" - - versions: - type: file - description: | - File containing software versions - Structure: [ path(versions.yml) ] - pattern: "versions.yml" authors: - "@eduard-watchmaker" maintainers: diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/nextflow.config b/subworkflows/nf-core/fastq_align_dedup_bwamem/nextflow.config old mode 100644 new mode 100755 index bc1fcf151503..441288760beb --- a/subworkflows/nf-core/fastq_align_dedup_bwamem/nextflow.config +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/nextflow.config @@ -1,4 +1,3 @@ -// IMPORTANT: This config file should be included to ensure that the subworkflow works properly. process { withName: 'SAMTOOLS_SORT' { ext.prefix = { "${meta.id}.sorted" } diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/gpu.nf.test b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/gpu.nf.test new file mode 100755 index 000000000000..1ede24641a08 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/gpu.nf.test @@ -0,0 +1,213 @@ +nextflow_workflow { + + name "Test Subworkflow FASTQ_ALIGN_DEDUP_BWAMEM" + script "../main.nf" + workflow "FASTQ_ALIGN_DEDUP_BWAMEM" + config "./nextflow.config" + + tag "gpu" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fastq_align_dedup_bwamem" + tag "parabricks/fq2bam" + tag "samtools/index" + tag "picard/markduplicates" + tag "bwa" + tag "bwa/index" + tag "parabricks/fq2bam" + tag "samtools" + tag "samtools/sort" + tag "samtools/index" + tag "samtools/idxstats" + tag "samtools/flagstat" + tag "samtools/stats" + tag "bam_sort_stats_samtools" + tag "picard/markduplicates" + tag "picard/addorreplacereadgroups" + + setup { + run("BWA_INDEX") { + script "../../../../modules/nf-core/bwa/index/main.nf" + process { + """ + input[0] = Channel.of([ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + """ + } + } + } + + test("Sarscov2 fasta - SE - deduplicate - with GPU parabricks/fq2bam") { + when { + workflow { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ]) + input[1] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + input[3] = BWA_INDEX.out.index + input[4] = false // skip_deduplication + input[5] = true // use_gpu + input[6] = "bam" // output_fmt + input[7] = Channel.of([[:], []]) // interval_file + input[8] = Channel.of([[:], []]) // known_sites + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, + workflow.out.samtools_flagstat, + workflow.out.samtools_stats, + workflow.out.samtools_index_stats, + workflow.out.picard_metrics.collect { meta, metrics -> file(metrics).name }, + workflow.out.multiqc.flatten().collect { path -> file(path).name }, + workflow.out.versions + ).match() + } + ) + } + } + + test("Sarscov2 fasta - SE - skip deduplication - with GPU parabricks/fq2bam") { + when { + workflow { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ]) + input[1] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + input[3] = BWA_INDEX.out.index + input[4] = true // skip_deduplication + input[5] = true // use_gpu + input[6] = "bam" // output_fmt + input[7] = Channel.of([[:], []]) // interval_file + input[8] = Channel.of([[:], []]) // known_sites + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, + workflow.out.samtools_flagstat, + workflow.out.samtools_stats, + workflow.out.samtools_index_stats, + workflow.out.picard_metrics.collect { meta, metrics -> file(metrics).name }, + workflow.out.multiqc.flatten().collect { path -> file(path).name }, + workflow.out.versions + ).match() + } + ) + } + } + + test("Sarscov2 fasta - PE - skip deduplication - with GPU parabricks/fq2bam") { + + when { + workflow { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + input[3] = BWA_INDEX.out.index + input[4] = true // skip_deduplication + input[5] = true // use_gpu + input[6] = "bam" // output_fmt + input[7] = Channel.of([[:], []]) // interval_file + input[8] = Channel.of([[:], []]) // known_sites + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, + workflow.out.samtools_flagstat, + workflow.out.samtools_stats, + workflow.out.samtools_index_stats, + workflow.out.picard_metrics.collect { meta, metrics -> file(metrics).name }, + workflow.out.multiqc.flatten().collect { path -> file(path).name }, + workflow.out.versions + ).match() + } + ) + } + } + + test("Sarscov2 fasta - SE - skip deduplication - with GPU parabricks/fq2bam - stub") { + options '-stub' + when { + workflow { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ]) + input[1] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [:], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + input[3] = BWA_INDEX.out.index + input[4] = false // deduplicate + input[5] = true // use_gpu + input[6] = "bam" // output_fmt + input[7] = Channel.of([[:], []]) // interval_file + input[8] = Channel.of([[:], []]) // known_sites + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() + } + ) + } + } +} diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/gpu.nf.test.snap b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/gpu.nf.test.snap new file mode 100644 index 000000000000..0c0ce9d53b3e --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/gpu.nf.test.snap @@ -0,0 +1,332 @@ +{ + "Sarscov2 fasta - SE - deduplicate - with GPU parabricks/fq2bam": { + "content": [ + [ + "b4ac761f4117f0c95693ce61825aa03d" + ], + [ + "test.deduped.sorted.bam.bai" + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.flagstat:md5,1d27922f8027430ae3055f7e7fc1ce36" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,f65552b84f1a36c9ded508c03a493158" + ] + ], + null, + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt" + ], + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt", + "test.flagstat", + "test.idxstats", + "test.stats" + ], + [ + "versions.yml:md5,33ef2596639d7968f743b8cdb697a274", + "versions.yml:md5,6fa0c192669339220d5c5735739188ac", + "versions.yml:md5,71928d7ca7a14123b4b025bab027d798", + "versions.yml:md5,c8ad9ea35566f100e41588f4c271b663", + "versions.yml:md5,e0c30eb274e33f3086ff9e694aae2161" + ] + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.04.7" + }, + "timestamp": "2025-12-03T20:40:01.700398606" + }, + "Sarscov2 fasta - PE - skip deduplication - with GPU parabricks/fq2bam": { + "content": [ + [ + "2d64e4363d9f3c0e2167fce49d5087cf" + ], + [ + "test.sorted.bam.bai" + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.flagstat:md5,18d602435a02a4d721b78d1812622159" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,75934f2a51780a80d2ab4674301a018d" + ] + ], + null, + [ + + ], + [ + "test.flagstat", + "test.idxstats", + "test.stats" + ], + [ + "versions.yml:md5,33ef2596639d7968f743b8cdb697a274", + "versions.yml:md5,71928d7ca7a14123b4b025bab027d798" + ] + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.04.7" + }, + "timestamp": "2025-12-03T20:41:36.509584972" + }, + "Sarscov2 fasta - SE - skip deduplication - with GPU parabricks/fq2bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.deduped.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.deduped.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": true + }, + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": true + }, + "test.deduped.sorted.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" + ], + [ + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + "versions.yml:md5,33ef2596639d7968f743b8cdb697a274", + "versions.yml:md5,6fa0c192669339220d5c5735739188ac", + "versions.yml:md5,71928d7ca7a14123b4b025bab027d798", + "versions.yml:md5,c8ad9ea35566f100e41588f4c271b663", + "versions.yml:md5,e0c30eb274e33f3086ff9e694aae2161" + ], + "bai": [ + [ + { + "id": "test", + "single_end": true + }, + "test.deduped.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.deduped.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "multiqc": [ + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" + ], + [ + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "picard_metrics": [ + [ + { + "id": "test", + "single_end": true + }, + "test.deduped.sorted.MarkDuplicates.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "samtools_flagstat": [ + [ + { + "id": "test", + "single_end": true + }, + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" + ] + ], + "samtools_idxstats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "samtools_stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,33ef2596639d7968f743b8cdb697a274", + "versions.yml:md5,6fa0c192669339220d5c5735739188ac", + "versions.yml:md5,71928d7ca7a14123b4b025bab027d798", + "versions.yml:md5,c8ad9ea35566f100e41588f4c271b663", + "versions.yml:md5,e0c30eb274e33f3086ff9e694aae2161" + ] + }, + [ + { + "FASTQ_ALIGN_DEDUP_BWAMEM:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX": { + "samtools": "1.22.1" + } + }, + { + "FASTQ_ALIGN_DEDUP_BWAMEM:PICARD_MARKDUPLICATES": { + "picard": "3.4.0" + } + }, + { + "FASTQ_ALIGN_DEDUP_BWAMEM:PARABRICKS_FQ2BAM": { + "pbrun": "4.6.0-1" + } + }, + { + "FASTQ_ALIGN_DEDUP_BWAMEM:SAMTOOLS_INDEX": { + "samtools": "1.22.1" + } + }, + { + "FASTQ_ALIGN_DEDUP_BWAMEM:PICARD_ADDORREPLACEREADGROUPS": { + "picard": "3.4.0" + } + } + ] + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.04.7" + }, + "timestamp": "2025-12-03T20:41:52.090425476" + }, + "Sarscov2 fasta - SE - skip deduplication - with GPU parabricks/fq2bam": { + "content": [ + [ + "30c325e1e032eb1782a280d34c0fb1c7" + ], + [ + "test.sorted.bam.bai" + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.flagstat:md5,1d27922f8027430ae3055f7e7fc1ce36" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,f65552b84f1a36c9ded508c03a493158" + ] + ], + null, + [ + + ], + [ + "test.flagstat", + "test.idxstats", + "test.stats" + ], + [ + "versions.yml:md5,33ef2596639d7968f743b8cdb697a274", + "versions.yml:md5,71928d7ca7a14123b4b025bab027d798" + ] + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.04.7" + }, + "timestamp": "2025-12-03T20:40:48.92955311" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test old mode 100644 new mode 100755 index 56c996c5c586..6debe9a0a367 --- a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test @@ -9,29 +9,29 @@ nextflow_workflow { tag "subworkflows_nfcore" tag "subworkflows/fastq_align_dedup_bwamem" tag "subworkflows/fastq_align_bwa" + tag "bwa" tag "bwa/index" tag "bwa/mem" + tag "parabricks/fq2bam" tag "samtools" tag "samtools/sort" tag "samtools/index" + tag "samtools/idxstats" tag "samtools/flagstat" tag "samtools/stats" - tag "samtools/idxstats" tag "bam_sort_stats_samtools" tag "fastq_align_bwa" tag "picard/markduplicates" tag "picard/addorreplacereadgroups" - tag "untar" setup { run("BWA_INDEX") { script "../../../../modules/nf-core/bwa/index/main.nf" process { """ - input[0] = [ - [ id:'genome' ], + input[0] = Channel.value([ [ id:'genome' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] + ]) """ } } @@ -56,7 +56,11 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ]) input[3] = BWA_INDEX.out.index - input[4] = false // skip_deduplication + input[4] = false // skip_deduplication + input[5] = false // use_gpu + input[6] = "bam" // output_fmt + input[7] = [[:], [] ] // interval_file + input[8] = [[:], [] ] // known_sites """ } } @@ -98,7 +102,11 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ]) input[3] = BWA_INDEX.out.index - input[4] = false // skip_deduplication + input[4] = false // skip_deduplication + input[5] = false // use_gpu + input[6] = "bam" // output_fmt + input[7] = [[:], [] ] // interval_file + input[8] = [[:], [] ] // known_sites """ } } @@ -140,7 +148,11 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ]) input[3] = BWA_INDEX.out.index - input[4] = true // skip_deduplication + input[4] = true // skip_deduplication + input[5] = false // use_gpu + input[6] = "bam" // output_fmt + input[7] = [[:], [] ] // interval_file + input[8] = [[:], [] ] // known_sites """ } } @@ -181,7 +193,11 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ]) input[3] = BWA_INDEX.out.index - input[4] = false // skip_deduplication + input[4] = false // skip_deduplication + input[5] = false // use_gpu + input[6] = "bam" // output_fmt + input[7] = [[:], [] ] // interval_file + input[8] = [[:], [] ] // known_sites """ } } @@ -189,12 +205,11 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot( + { assert snapshot( workflow.out, workflow.out.versions.collect{ path(it).yaml } ).match() } ) } } - } diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test.snap index 5ee3a0738c38..46fda1f8ac21 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test.snap @@ -54,7 +54,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-12-03T12:27:38.204299" + "timestamp": "2025-11-03T18:07:22.444845091" }, "Params: bwamem paired-end - skip_deduplication": { "content": [ @@ -107,7 +107,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-12-03T12:28:09.085652" + "timestamp": "2025-11-03T18:07:48.375738382" }, "Params: bwamem single-end - default - stub": { "content": [ @@ -289,7 +289,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-12-03T12:28:25.358403" + "timestamp": "2025-11-03T18:08:01.772454395" }, "Params: bwamem paired-end - default": { "content": [ @@ -346,6 +346,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.0" }, - "timestamp": "2025-12-03T12:27:56.314782" + "timestamp": "2025-11-03T18:07:38.589146631" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/nextflow.config b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/nextflow.config old mode 100644 new mode 100755 index 755ba1b3feed..bd5ccae7b402 --- a/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/nextflow.config +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/nextflow.config @@ -1,4 +1,7 @@ process { + withName: 'PARABRICKS_FQ2BAM' { + ext.args = '--low-memory' + } withName: 'SAMTOOLS_SORT' { ext.prefix = { "${meta.id}.sorted" } }