From 01d0e4ed7342cde96f4ac4f36ef3b06d2af06a53 Mon Sep 17 00:00:00 2001 From: nicorap <78540495+nicorap@users.noreply.github.com> Date: Mon, 11 May 2026 12:00:10 +0200 Subject: [PATCH 1/4] fix: sentieon gvcftyper accepts intervals --- modules/nf-core/sentieon/gvcftyper/main.nf | 3 +- .../sentieon/gvcftyper/tests/main.nf.test | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/sentieon/gvcftyper/main.nf b/modules/nf-core/sentieon/gvcftyper/main.nf index af3cbdcf689c..b002b20c7775 100644 --- a/modules/nf-core/sentieon/gvcftyper/main.nf +++ b/modules/nf-core/sentieon/gvcftyper/main.nf @@ -27,13 +27,14 @@ process SENTIEON_GVCFTYPER { def prefix = task.ext.prefix ?: "${meta.id}_genotyped" def gvcfs_input = '-v ' + gvcfs.join(' -v ') def dbsnp_cmd = dbsnp ? "--dbsnp ${dbsnp}" : "" + def interval_command = intervals ? "--interval ${intervals}" : "" def sentieonLicense = secrets.SENTIEON_LICENSE_BASE64 ? "export SENTIEON_LICENSE=\$(mktemp);echo -e \"${secrets.SENTIEON_LICENSE_BASE64}\" | base64 -d > \$SENTIEON_LICENSE; " : "" """ ${sentieonLicense} - sentieon driver -r ${fasta} --algo GVCFtyper ${gvcfs_input} ${dbsnp_cmd} ${prefix}.vcf.gz + sentieon driver -r ${fasta} ${interval_command} --algo GVCFtyper ${gvcfs_input} ${dbsnp_cmd} ${prefix}.vcf.gz """ diff --git a/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test b/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test index a32a8d85eddd..5c810f438817 100644 --- a/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test +++ b/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test @@ -170,6 +170,45 @@ nextflow_process { } } + test("sentieon gvcftyper intervals constrain output - regression") { + // Regression test for the bug where `path(intervals)` was staged but + // never passed to `sentieon driver --interval`, causing GVCFtyper to + // run unconstrained. Before the fix, the variantsMD5 of an intervals + // run was identical to the no-intervals run + // ("d13216836f1452e200b215b796606671"). After the fix, the bed must + // actually restrict GVCFtyper, so the md5 MUST differ. + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics//homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + ] + + input[1] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] + input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] + input[3] = [[:], []] + input[4] = [[:], []] + """ + } + } + + then { + assert process.success + assertAll( + { assert path(process.out.vcf_gz[0][1]).vcf.variantsMD5 != "d13216836f1452e200b215b796606671" }, + { assert snapshot( + process.out.findAll { key, val -> key.startsWith("versions") }, + file(process.out.vcf_gz_tbi.get(0).get(1)).name, + path(process.out.vcf_gz[0][1]).vcf.variantsMD5 + ).match() + } + ) + } + } + test("sentieon gvcftyper - stub") { options "-stub" From 0c92d5ea780b8daa568c6ab62b855b455a5db767 Mon Sep 17 00:00:00 2001 From: nicorap <78540495+nicorap@users.noreply.github.com> Date: Fri, 15 May 2026 09:17:37 +0200 Subject: [PATCH 2/4] style: line breaks in sentieon gvcftyper driver call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per @SPPearce review on #11582 — match the multi-line format used in sentieon/haplotyper. --- modules/nf-core/sentieon/gvcftyper/main.nf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/sentieon/gvcftyper/main.nf b/modules/nf-core/sentieon/gvcftyper/main.nf index b002b20c7775..9ef05cbcaaa0 100644 --- a/modules/nf-core/sentieon/gvcftyper/main.nf +++ b/modules/nf-core/sentieon/gvcftyper/main.nf @@ -34,7 +34,13 @@ process SENTIEON_GVCFTYPER { """ ${sentieonLicense} - sentieon driver -r ${fasta} ${interval_command} --algo GVCFtyper ${gvcfs_input} ${dbsnp_cmd} ${prefix}.vcf.gz + sentieon driver \\ + -r ${fasta} \\ + ${interval_command} \\ + --algo GVCFtyper \\ + ${gvcfs_input} \\ + ${dbsnp_cmd} \\ + ${prefix}.vcf.gz """ From 161bbeb01e3c9d2f75cba375599cce148bef8101 Mon Sep 17 00:00:00 2001 From: nicorap <78540495+nicorap@users.noreply.github.com> Date: Sun, 17 May 2026 11:11:47 +0200 Subject: [PATCH 3/4] lint: rename meta1..meta4 to meta2..meta5 per nf-core convention --- modules/nf-core/sentieon/gvcftyper/main.nf | 8 ++++---- modules/nf-core/sentieon/gvcftyper/meta.yml | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/nf-core/sentieon/gvcftyper/main.nf b/modules/nf-core/sentieon/gvcftyper/main.nf index 9ef05cbcaaa0..98f56143de9d 100644 --- a/modules/nf-core/sentieon/gvcftyper/main.nf +++ b/modules/nf-core/sentieon/gvcftyper/main.nf @@ -10,10 +10,10 @@ process SENTIEON_GVCFTYPER { input: tuple val(meta), path(gvcfs), path(tbis), path(intervals) - tuple val(meta1), path(fasta) - tuple val(meta2), path(fai) - tuple val(meta3), path(dbsnp) - tuple val(meta4), path(dbsnp_tbi) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(dbsnp) + tuple val(meta5), path(dbsnp_tbi) output: tuple val(meta), path("*.vcf.gz"), emit: vcf_gz diff --git a/modules/nf-core/sentieon/gvcftyper/meta.yml b/modules/nf-core/sentieon/gvcftyper/meta.yml index 798157dd6e88..23b99042e504 100644 --- a/modules/nf-core/sentieon/gvcftyper/meta.yml +++ b/modules/nf-core/sentieon/gvcftyper/meta.yml @@ -33,10 +33,10 @@ input: ontologies: [] - intervals: type: file - description: Interval file with the genomic regions included in the library - (optional) + description: Interval file with the genomic regions included in the + library (optional) ontologies: [] - - - meta1: + - - meta2: type: map description: | Groovy Map containing sample information @@ -46,7 +46,7 @@ input: description: Reference fasta file pattern: "*.fasta" ontologies: [] - - - meta2: + - - meta3: type: map description: | Groovy Map containing sample information @@ -56,7 +56,7 @@ input: description: Reference fasta index file pattern: "*.fai" ontologies: [] - - - meta3: + - - meta4: type: map description: | Groovy Map containing sample information @@ -66,8 +66,8 @@ input: description: dbSNP VCF file pattern: "*.vcf.gz" ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format - - - meta4: + - edam: http://edamontology.org/format_3989 + - - meta5: type: map description: | Groovy Map containing sample information @@ -89,7 +89,7 @@ output: description: VCF file pattern: "*.vcf.gz" ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + - edam: http://edamontology.org/format_3989 vcf_gz_tbi: - - meta: type: map @@ -109,7 +109,7 @@ output: type: string description: The tool name - sentieon driver --version | sed "s/.*-//g": - type: string + type: eval description: The command used to generate the version of the tool topics: versions: @@ -120,7 +120,7 @@ topics: type: string description: The tool name - sentieon driver --version | sed "s/.*-//g": - type: string + type: eval description: The command used to generate the version of the tool authors: - "@asp8200" From 0c5993b7d5023a9372908e810627cea0bdcf2557 Mon Sep 17 00:00:00 2001 From: nicorap <78540495+nicorap@users.noreply.github.com> Date: Mon, 18 May 2026 08:10:52 +0200 Subject: [PATCH 4/4] test: drop tautological regression test The test asserted variantsMD5 differs from the buggy md5, but the genome.bed used here covers all variants in test.genome.vcf.gz, so the BED is a no-op and the md5 is the same with or without --interval. Surfacing the bug would require a gVCF with variants outside the BED's coverage, which the test-datasets don't provide. --- .../sentieon/gvcftyper/tests/main.nf.test | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test b/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test index 5c810f438817..a32a8d85eddd 100644 --- a/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test +++ b/modules/nf-core/sentieon/gvcftyper/tests/main.nf.test @@ -170,45 +170,6 @@ nextflow_process { } } - test("sentieon gvcftyper intervals constrain output - regression") { - // Regression test for the bug where `path(intervals)` was staged but - // never passed to `sentieon driver --interval`, causing GVCFtyper to - // run unconstrained. Before the fix, the variantsMD5 of an intervals - // run was identical to the no-intervals run - // ("d13216836f1452e200b215b796606671"). After the fix, the bed must - // actually restrict GVCFtyper, so the md5 MUST differ. - - when { - process { - """ - input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics//homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) - ] - - input[1] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)] - input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)] - input[3] = [[:], []] - input[4] = [[:], []] - """ - } - } - - then { - assert process.success - assertAll( - { assert path(process.out.vcf_gz[0][1]).vcf.variantsMD5 != "d13216836f1452e200b215b796606671" }, - { assert snapshot( - process.out.findAll { key, val -> key.startsWith("versions") }, - file(process.out.vcf_gz_tbi.get(0).get(1)).name, - path(process.out.vcf_gz[0][1]).vcf.variantsMD5 - ).match() - } - ) - } - } - test("sentieon gvcftyper - stub") { options "-stub"