From 36ad41b0e4a6619a0f6b594880db9b769a9b4c83 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/2] 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 c3656d80bd7b32075c5b78f684ecde5f31663a96 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/2] 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 """