diff --git a/modules/nf-core/delly/call/environment.yml b/modules/nf-core/delly/call/environment.yml index db3a41ec8ccf..d3495af95e05 100644 --- a/modules/nf-core/delly/call/environment.yml +++ b/modules/nf-core/delly/call/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::delly=1.3.3 + - bioconda::delly=1.7.3 diff --git a/modules/nf-core/delly/call/main.nf b/modules/nf-core/delly/call/main.nf index cffa1985849f..05df82b25bbc 100644 --- a/modules/nf-core/delly/call/main.nf +++ b/modules/nf-core/delly/call/main.nf @@ -4,13 +4,14 @@ process DELLY_CALL { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/delly:1.3.3--h4d20210_0' : - 'biocontainers/delly:1.3.3--h4d20210_0' }" + 'https://depot.galaxyproject.org/singularity/delly:1.7.3--hd6466ae_0' : + 'biocontainers/delly:1.7.3--hd6466ae_0' }" input: tuple val(meta), path(input), path(input_index), path(vcf), path(vcf_index), path(exclude_bed) tuple val(meta2), path(fasta) tuple val(meta3), path(fai) + val(suffix) output: tuple val(meta), path("*.{bcf,vcf.gz}") , emit: bcf @@ -24,7 +25,6 @@ process DELLY_CALL { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def suffix = task.ext.suffix ?: "bcf" def exclude = exclude_bed ? "--exclude ${exclude_bed}" : "" @@ -37,6 +37,7 @@ process DELLY_CALL { delly \\ call \\ ${args} \\ + --threads ${task.cpus} \\ ${bcf_output} \\ --genome ${fasta} \\ ${genotype} \\ @@ -47,7 +48,6 @@ process DELLY_CALL { stub: def prefix = task.ext.prefix ?: "${meta.id}" - def suffix = task.ext.suffix ?: "bcf" def bcf_output = suffix == "bcf" ? "touch ${prefix}.bcf && touch ${prefix}.bcf.csi" : "" def vcf_output = suffix == "vcf" ? "echo '' | gzip > ${prefix}.vcf.gz && touch ${prefix}.vcf.gz.tbi" : "" diff --git a/modules/nf-core/delly/call/meta.yml b/modules/nf-core/delly/call/meta.yml index e62d98b17fb8..cc5e7f9c5334 100644 --- a/modules/nf-core/delly/call/meta.yml +++ b/modules/nf-core/delly/call/meta.yml @@ -69,6 +69,13 @@ input: description: Index of reference fasta file to identify split-reads pattern: "*.fai" ontologies: [] + - suffix: + type: string + description: A flag to specify whether the output should be in BCF or VCF + format + enum: + - "bcf" + - "vcf" output: bcf: - - meta: @@ -78,8 +85,8 @@ output: e.g. [ id:'test', single_end:false ] - "*.{bcf,vcf.gz}": type: file - description: Called variants in BCF/VCF format. Specify either "bcf" or - "vcf" in ext.suffix to define the output type + description: Called variants in BCF/VCF format. Set suffix to either + "bcf" or "vcf" to define the output type pattern: "*.{bcf,vcf.gz}" ontologies: [] csi: diff --git a/modules/nf-core/delly/call/tests/main.nf.test b/modules/nf-core/delly/call/tests/main.nf.test index 23b3bb3fa803..9d05a4bda0e9 100644 --- a/modules/nf-core/delly/call/tests/main.nf.test +++ b/modules/nf-core/delly/call/tests/main.nf.test @@ -9,9 +9,42 @@ nextflow_process { tag "delly" tag "delly/call" - test("homo_sapiens - bam, bai, [], [], [], fasta, fai") { + test("homo_sapiens - bam, bai, [], [], [], fasta, fai, vcf") { - config "./vcf.config" + when { + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam", checkIfExists:true), + file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai", checkIfExists:true), + [], + [], + [] + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta", checkIfExists:true) + ] + input[2] = [ + [ id:'fai' ], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) + ] + input[3] = 'vcf' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + + test("homo_sapiens - bam, bai, [], [], [], fasta, fai, bcf") { when { process { @@ -32,6 +65,7 @@ nextflow_process { [ id:'fai' ], file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) ] + input[3] = 'bcf' """ } } @@ -42,10 +76,78 @@ nextflow_process { { assert snapshot(sanitizeOutput(process.out)).match() } ) } + } + + test("homo_sapiens - bam, bai, [], [], [], fasta, fai, []") { + + when { + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam", checkIfExists:true), + file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai", checkIfExists:true), + [], + [], + [] + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta", checkIfExists:true) + ] + input[2] = [ + [ id:'fai' ], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) + ] + input[3] = '' + """ + } + } + + then { + assertAll( + { assert !process.success }, + ) + } + } + + test("homo_sapiens - bam, bai, [], [], [], fasta, fai, bcf - config") { + + config "./nextflow.config" + when { + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam", checkIfExists:true), + file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai", checkIfExists:true), + [], + [], + [] + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta", checkIfExists:true) + ] + input[2] = [ + [ id:'fai' ], + file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) + ] + input[3] = 'bcf' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } } - test("homo_sapiens - cram, crai, [], [], [], fasta, fai") { + test("homo_sapiens - cram, crai, [], [], [], fasta, fai, bcf") { when { process { @@ -66,6 +168,7 @@ nextflow_process { [ id:'fai' ], file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) ] + input[3] = 'bcf' """ } } @@ -79,7 +182,7 @@ nextflow_process { } - test("homo_sapiens - cram, crai, [], [], bed, fasta, fai") { + test("homo_sapiens - cram, crai, [], [], bed, fasta, fai, bcf") { when { process { @@ -100,6 +203,7 @@ nextflow_process { [ id:'fai' ], file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) ] + input[3] = 'bcf' """ } } @@ -113,7 +217,7 @@ nextflow_process { } - test("homo_sapiens - cram, crai, vcf, tbi, [], fasta, fai") { + test("homo_sapiens - cram, crai, vcf, tbi, [], fasta, fai, bcf") { when { process { @@ -134,6 +238,7 @@ nextflow_process { [ id:'fai' ], file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) ] + input[3] = 'bcf' """ } } @@ -147,9 +252,8 @@ nextflow_process { } - test("homo_sapiens - bam, bai, [], [], [], fasta, fai - stub") { + test("homo_sapiens - bam, bai, [], [], [], fasta, fai, vcf - stub") { - config "./vcf.config" options "-stub" when { @@ -171,6 +275,7 @@ nextflow_process { [ id:'fai' ], file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai", checkIfExists:true) ] + input[3] = 'vcf' """ } } diff --git a/modules/nf-core/delly/call/tests/main.nf.test.snap b/modules/nf-core/delly/call/tests/main.nf.test.snap index edcafa3901f0..be29257837b3 100644 --- a/modules/nf-core/delly/call/tests/main.nf.test.snap +++ b/modules/nf-core/delly/call/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "homo_sapiens - bam, bai, [], [], [], fasta, fai - stub": { + "homo_sapiens - bam, bai, [], [], [], fasta, fai, vcf - stub": { "content": [ { "bcf": [ @@ -22,18 +22,18 @@ [ "DELLY_CALL", "delly", - "1.3.3" + "1.7.3" ] ] } ], - "timestamp": "2026-02-19T16:50:15.628255934", + "timestamp": "2026-03-31T22:56:56.675286386", "meta": { "nf-test": "0.9.4", "nextflow": "25.10.4" } }, - "homo_sapiens - cram, crai, vcf, tbi, [], fasta, fai": { + "homo_sapiens - cram, crai, [], [], [], fasta, fai, bcf": { "content": [ { "bcf": [ @@ -41,7 +41,7 @@ { "id": "test" }, - "test.bcf:md5,85e9ba0873366c41099bddf72d4ebe4e" + "test.bcf:md5,9d9ef4d09622ee9460401e49dcaf398d" ] ], "csi": [ @@ -56,18 +56,18 @@ [ "DELLY_CALL", "delly", - "1.3.3" + "1.7.3" ] ] } ], - "timestamp": "2026-02-19T16:50:05.300001721", + "timestamp": "2026-04-01T08:45:04.964142647", "meta": { "nf-test": "0.9.4", "nextflow": "25.10.4" } }, - "homo_sapiens - cram, crai, [], [], [], fasta, fai": { + "homo_sapiens - bam, bai, [], [], [], fasta, fai, bcf": { "content": [ { "bcf": [ @@ -75,7 +75,7 @@ { "id": "test" }, - "test.bcf:md5,85e9ba0873366c41099bddf72d4ebe4e" + "test.bcf:md5,9d9ef4d09622ee9460401e49dcaf398d" ] ], "csi": [ @@ -90,18 +90,18 @@ [ "DELLY_CALL", "delly", - "1.3.3" + "1.7.3" ] ] } ], - "timestamp": "2026-02-19T16:49:48.55960664", + "timestamp": "2026-04-01T08:43:58.870564235", "meta": { "nf-test": "0.9.4", "nextflow": "25.10.4" } }, - "homo_sapiens - cram, crai, [], [], bed, fasta, fai": { + "homo_sapiens - cram, crai, vcf, tbi, [], fasta, fai, bcf": { "content": [ { "bcf": [ @@ -109,7 +109,7 @@ { "id": "test" }, - "test.bcf:md5,85e9ba0873366c41099bddf72d4ebe4e" + "test.bcf:md5,9d9ef4d09622ee9460401e49dcaf398d" ] ], "csi": [ @@ -124,18 +124,18 @@ [ "DELLY_CALL", "delly", - "1.3.3" + "1.7.3" ] ] } ], - "timestamp": "2026-02-19T16:49:56.887027305", + "timestamp": "2026-04-01T08:45:42.65724177", "meta": { "nf-test": "0.9.4", "nextflow": "25.10.4" } }, - "homo_sapiens - bam, bai, [], [], [], fasta, fai": { + "homo_sapiens - bam, bai, [], [], [], fasta, fai, bcf - config": { "content": [ { "bcf": [ @@ -143,7 +143,41 @@ { "id": "test" }, - "test.vcf.gz:md5,3d655b3f166bb13a993b608d58c71183" + "test.bcf:md5,9d9ef4d09622ee9460401e49dcaf398d" + ] + ], + "csi": [ + [ + { + "id": "test" + }, + "test.bcf.csi:md5,c198abfc14584c5ac69c004057927e0b" + ] + ], + "versions_delly": [ + [ + "DELLY_CALL", + "delly", + "1.7.3" + ] + ] + } + ], + "timestamp": "2026-04-01T08:44:43.856518328", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "homo_sapiens - bam, bai, [], [], [], fasta, fai, vcf": { + "content": [ + { + "bcf": [ + [ + { + "id": "test" + }, + "test.vcf.gz:md5,49c63c62559827d8b47e5d64d30a1e83" ] ], "csi": [ @@ -158,12 +192,46 @@ [ "DELLY_CALL", "delly", - "1.3.3" + "1.7.3" + ] + ] + } + ], + "timestamp": "2026-04-01T08:43:36.727290615", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "homo_sapiens - cram, crai, [], [], bed, fasta, fai, bcf": { + "content": [ + { + "bcf": [ + [ + { + "id": "test" + }, + "test.bcf:md5,9d9ef4d09622ee9460401e49dcaf398d" + ] + ], + "csi": [ + [ + { + "id": "test" + }, + "test.bcf.csi:md5,c198abfc14584c5ac69c004057927e0b" + ] + ], + "versions_delly": [ + [ + "DELLY_CALL", + "delly", + "1.7.3" ] ] } ], - "timestamp": "2026-02-19T16:49:39.279196351", + "timestamp": "2026-04-01T08:45:23.053857188", "meta": { "nf-test": "0.9.4", "nextflow": "25.10.4" diff --git a/modules/nf-core/delly/call/tests/vcf.config b/modules/nf-core/delly/call/tests/nextflow.config similarity index 63% rename from modules/nf-core/delly/call/tests/vcf.config rename to modules/nf-core/delly/call/tests/nextflow.config index eba4419bd50b..38ceec37363d 100644 --- a/modules/nf-core/delly/call/tests/vcf.config +++ b/modules/nf-core/delly/call/tests/nextflow.config @@ -1,5 +1,5 @@ process { withName: "DELLY_CALL" { - ext.suffix = "vcf" + cpus = 2 } }