diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/main.nf b/subworkflows/nf-core/fastq_align_dedup_bwamem/main.nf new file mode 100644 index 00000000000..a496e1e3b55 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/main.nf @@ -0,0 +1,90 @@ +include { FASTQ_ALIGN_BWA } from '../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 { SAMTOOLS_INDEX } from '../../../modules/nf-core/samtools/index/main' + +workflow FASTQ_ALIGN_DEDUP_BWAMEM { + + take: + ch_reads // channel: [ val(meta), [ reads ] ] + ch_fasta // channel: [ val(meta), [ fasta ] ] + ch_fasta_index // channel: [ val(meta), [ fasta index ] ] + ch_bwamem_index // channel: [ val(meta), [ bwam index ] ] + skip_deduplication // boolean: whether to deduplicate alignments + use_gpu // boolean: whether to use GPU or CPU for bwamem alignment + + main: + + ch_alignment = Channel.empty() + ch_alignment_index = Channel.empty() + ch_flagstat = Channel.empty() + ch_stats = 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 = ch_alignment.mix(FASTQ_ALIGN_BWA.out.bam) + ch_alignment_index = ch_alignment.mix(FASTQ_ALIGN_BWA.out.bai) + ch_stats = ch_alignment.mix(FASTQ_ALIGN_BWA.out.stats) // channel: [ val(meta), path(stats) ] + ch_flagstat = ch_alignment.mix(FASTQ_ALIGN_BWA.out.flagstat) // channel: [ val(meta), path(flagstat) ] + ch_idxstats = ch_alignment.mix(FASTQ_ALIGN_BWA.out.idxstats) // channel: [ val(meta), path(idxstats) ] + ch_versions = ch_versions.mix(FASTQ_ALIGN_BWA.out.versions.first()) + + if (!skip_deduplication) { + /* + * Run Picard AddOrReplaceReadGroups to add read group (RG) to reads in bam file + */ + PICARD_ADDORREPLACEREADGROUPS ( + ch_alignment, + ch_fasta, + ch_fasta_index + ) + ch_versions = ch_versions.mix(PICARD_ADDORREPLACEREADGROUPS.out.versions.first()) + + /* + * Run Picard MarkDuplicates with the --REMOVE_DUPLICATES true flag + */ + + PICARD_MARKDUPLICATES ( + PICARD_ADDORREPLACEREADGROUPS.out.bam, + ch_fasta, + ch_fasta_index + ) + ch_versions = ch_versions.mix(PICARD_MARKDUPLICATES.out.versions.first()) + + /* + * Run samtools index on deduplicated alignment + */ + SAMTOOLS_INDEX ( + PICARD_MARKDUPLICATES.out.bam + ) + ch_alignment = PICARD_MARKDUPLICATES.out.bam + ch_alignment_index = SAMTOOLS_INDEX.out.bai + ch_picard_metrics = PICARD_MARKDUPLICATES.out.metrics + ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first()) + } + + /* + * Collect MultiQC inputs + */ + ch_multiqc_files = ch_picard_metrics.collect{ meta, metrics -> metrics } + .mix(ch_flagstat.collect{ meta, flagstat -> flagstat }) + .mix(ch_stats.collect{ meta, stats -> stats }) + .mix(ch_idxstats.collect{ meta, stats -> stats }) + + emit: + bam = ch_alignment // channel: [ val(meta), [ bam ] ] + bai = ch_alignment_index // channel: [ val(meta), [ bai ] ] + samtools_flagstat = ch_flagstat // channel: [ val(meta), [ flagstat ] ] + samtools_stats = ch_stats // channel: [ val(meta), [ stats ] ] + samtools_index_stats = ch_idxstats // channel: [ val(meta), [ idxstats ] ] + picard_metrics = ch_picard_metrics // channel: [ val(meta), [ metrics ] ] + multiqc = ch_multiqc_files // channel: [ *{html,txt} ] + versions = ch_versions // channel: [ versions.yml ] +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/meta.yml b/subworkflows/nf-core/fastq_align_dedup_bwamem/meta.yml new file mode 100644 index 00000000000..359f2db66b0 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/meta.yml @@ -0,0 +1,96 @@ +# 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 +keywords: + - bwamem + - alignment + - map + - 5mC + - methylseq + - DNA + - fastq + - bam +components: + - samtools/index + - picard/addorreplacereadgroups + - picard/markduplicates + - fastq_align_bwa +input: + - ch_reads: + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + Structure: [ val(meta), [ path(reads) ] ] + pattern: "*.{fastq,fastq.gz}" + - ch_fasta: + type: file + description: | + Structure: [ val(meta), path(fasta) ] + pattern: "*.{fa,fa.gz}" + - ch_fasta_index: + type: file + description: | + Structure: [ val(meta), path(fasta index) ] + - ch_bwamem_index: + type: directory + description: | + Bwa-mem genome index files + Structure: [ val(meta), path(index) ] + pattern: "Bwa-memIndex" + - skip_deduplication: + type: boolean + description: | + Skip deduplication of aligned reads +output: + - bam: + type: file + description: | + Channel containing BAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.bam" + - bai: + type: file + description: | + Channel containing indexed BAM (BAI) files + Structure: [ val(meta), path(bai) ] + pattern: "*.bai" + - samtools_flagstat: + type: file + description: | + File containing samtools flagstat output + Structure: [ val(meta), path(flagstat) ] + pattern: "*.flagstat" + - samtools_idxstats: + type: file + description: | + File containing samtools idxstats output + Structure: [ val(meta), path(idxstats) ] + pattern: "*.idxstats" + - samtools_stats: + type: file + description: | + File containing samtools stats output + Structure: [ val(meta), path(stats) ] + pattern: "*.{stats}" + - picard_metrics: + type: file + description: | + Duplicate metrics file generated by picard + Structure: [ val(meta), path(metrics) ] + pattern: "*.{metrics.txt}" + - multiqc: + type: file + description: | + Channel containing MultiQC report aggregating results across samples. + Structure: [ val(meta), path(multiqc_report.html) ] + pattern: "*.html" + - versions: + type: file + description: | + File containing software versions + Structure: [ path(versions.yml) ] + pattern: "versions.yml" +authors: + - "@eduard-watchmaker" +maintainers: + - "@eduard-watchmaker" \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dedup_bwamem/nextflow.config b/subworkflows/nf-core/fastq_align_dedup_bwamem/nextflow.config new file mode 100644 index 00000000000..bc1fcf15150 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/nextflow.config @@ -0,0 +1,14 @@ +// IMPORTANT: This config file should be included to ensure that the subworkflow works properly. +process { + withName: 'SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.sorted" } + } + withName: 'PICARD_MARKDUPLICATES' { + ext.args = "--ASSUME_SORTED true --REMOVE_DUPLICATES true --VALIDATION_STRINGENCY LENIENT --PROGRAM_RECORD_ID 'null' --TMP_DIR tmp" + ext.prefix = { "${meta.id}.deduped.sorted" } + } + withName: 'PICARD_ADDORREPLACEREADGROUPS' { + ext.args = "--RGID 1 --RGLB lib1 --RGPL illumina --RGPU unit1 --RGSM sample1" + ext.prefix = { "${meta.id}.RG.sorted" } + } +} 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 new file mode 100644 index 00000000000..be79feed617 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test @@ -0,0 +1,204 @@ +nextflow_workflow { + + name "Test Subworkflow FASTQ_ALIGN_DEDUP_BWAMEM" + script "../main.nf" + workflow "FASTQ_ALIGN_DEDUP_BWAMEM" + config "./nextflow.config" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fastq_align_dedup_bwamem" + tag "subworkflows/fastq_align_bwa" + tag "bwa/index" + tag "bwa/mem" + tag "samtools" + tag "samtools/sort" + tag "samtools/index" + 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' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + } + + test("Params: bwamem single-end - default") { + + 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] = false // use_gpu + """ + } + } + + 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("Params: bwamem paired-end - default") { + + 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), + 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] = false // skip_deduplication + input[5] = false // use_gpu + """ + } + } + + 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("Params: bwamem paired-end - skip_deduplication") { + + 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), + 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] = false // use_gpu + """ + } + } + + 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("Params: bwamem single-end - default - 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 // skip_deduplication + input[5] = false // use_gpu + """ + } + } + + 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/main.nf.test.snap b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test.snap new file mode 100644 index 00000000000..214e37f4d4d --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/main.nf.test.snap @@ -0,0 +1,472 @@ +{ + "Params: bwamem single-end - default": { + "content": [ + [ + "b4ac761f4117f0c95693ce61825aa03d" + ], + [ + "test.deduped.sorted.bam.bai" + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.flagstat:md5,2191911d72575a2358b08b1df64ccb53" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,0883b19c92a783883b3e11d5bfcc5d6a" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.idxstats:md5,613e048487662c694aa4a2f73ca96a20" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ] + ], + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt" + ], + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt", + "test.sorted.bam", + "test.flagstat", + "test.sorted.bam", + "test.idxstats", + "test.sorted.bam", + "test.stats" + ], + [ + "versions.yml:md5,6fa0c192669339220d5c5735739188ac", + "versions.yml:md5,8f2ff4c430c4c5f42631534eaf358833", + "versions.yml:md5,c8ad9ea35566f100e41588f4c271b663", + "versions.yml:md5,e0c30eb274e33f3086ff9e694aae2161" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.5" + }, + "timestamp": "2025-10-24T15:06:49.6951852" + }, + "Params: bwamem paired-end - skip_deduplication": { + "content": [ + [ + "94fcf617f5b994584c4e8d4044e16b4f" + ], + [ + "test.sorted.bam", + "test.sorted.bam.bai" + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.flagstat:md5,2191911d72575a2358b08b1df64ccb53" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,0883b19c92a783883b3e11d5bfcc5d6a" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.idxstats:md5,613e048487662c694aa4a2f73ca96a20" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ] + ], + [ + + ], + [ + "test.sorted.bam", + "test.flagstat", + "test.sorted.bam", + "test.idxstats", + "test.sorted.bam", + "test.stats" + ], + [ + "versions.yml:md5,8f2ff4c430c4c5f42631534eaf358833" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.5" + }, + "timestamp": "2025-10-24T15:07:14.224268922" + }, + "Params: bwamem single-end - default - 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" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": true + }, + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam: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.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" + ], + [ + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + "versions.yml:md5,6fa0c192669339220d5c5735739188ac", + "versions.yml:md5,8f2ff4c430c4c5f42631534eaf358833", + "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.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" + ], + [ + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + "test.sorted.bam: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" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "samtools_index_stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "samtools_stats": [ + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,6fa0c192669339220d5c5735739188ac", + "versions.yml:md5,8f2ff4c430c4c5f42631534eaf358833", + "versions.yml:md5,c8ad9ea35566f100e41588f4c271b663", + "versions.yml:md5,e0c30eb274e33f3086ff9e694aae2161" + ] + }, + [ + { + "FASTQ_ALIGN_DEDUP_BWAMEM:PICARD_MARKDUPLICATES": { + "picard": "3.4.0" + } + }, + { + "FASTQ_ALIGN_DEDUP_BWAMEM:FASTQ_ALIGN_BWA:BWA_MEM": { + "bwa": "0.7.19-r1273", + "samtools": "1.22.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.2", + "nextflow": "24.10.5" + }, + "timestamp": "2025-10-24T15:07:27.497220186" + }, + "Params: bwamem paired-end - default": { + "content": [ + [ + "b4ac761f4117f0c95693ce61825aa03d" + ], + [ + "test.deduped.sorted.bam.bai" + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.flagstat:md5,2191911d72575a2358b08b1df64ccb53" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.stats:md5,0883b19c92a783883b3e11d5bfcc5d6a" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.idxstats:md5,613e048487662c694aa4a2f73ca96a20" + ], + [ + { + "id": "test", + "single_end": true + }, + "test.sorted.bam:md5,969d4fb42ba23bba181aecc1ae89ab4b" + ] + ], + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt" + ], + [ + "test.deduped.sorted.MarkDuplicates.metrics.txt", + "test.sorted.bam", + "test.flagstat", + "test.sorted.bam", + "test.idxstats", + "test.sorted.bam", + "test.stats" + ], + [ + "versions.yml:md5,6fa0c192669339220d5c5735739188ac", + "versions.yml:md5,8f2ff4c430c4c5f42631534eaf358833", + "versions.yml:md5,c8ad9ea35566f100e41588f4c271b663", + "versions.yml:md5,e0c30eb274e33f3086ff9e694aae2161" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.5" + }, + "timestamp": "2025-10-24T15:07:05.175157122" + } +} \ 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 new file mode 100644 index 00000000000..755ba1b3fee --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dedup_bwamem/tests/nextflow.config @@ -0,0 +1,13 @@ +process { + withName: 'SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.sorted" } + } + withName: 'PICARD_MARKDUPLICATES' { + ext.args = "--ASSUME_SORTED true --REMOVE_DUPLICATES true --VALIDATION_STRINGENCY LENIENT --PROGRAM_RECORD_ID 'null' --TMP_DIR tmp" + ext.prefix = { "${meta.id}.deduped.sorted" } + } + withName: 'PICARD_ADDORREPLACEREADGROUPS' { + ext.args = "--RGID 1 --RGLB lib1 --RGPL illumina --RGPU unit1 --RGSM sample1" + ext.prefix = { "${meta.id}.RG.sorted" } + } +}