From a79579d75a82a5cb74618b7cb51f127a28835aba Mon Sep 17 00:00:00 2001 From: "felix.vandermeeren@chu-montpellier.fr" Date: Tue, 7 Apr 2026 13:58:18 +0200 Subject: [PATCH 1/4] Add new pedigree input --- modules/nf-core/whatshap/phase/main.nf | 3 ++- modules/nf-core/whatshap/phase/meta.yml | 4 ++++ modules/nf-core/whatshap/phase/tests/main.nf.test | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/whatshap/phase/main.nf b/modules/nf-core/whatshap/phase/main.nf index a2360a689741..cdc8bef46208 100644 --- a/modules/nf-core/whatshap/phase/main.nf +++ b/modules/nf-core/whatshap/phase/main.nf @@ -8,7 +8,7 @@ process WHATSHAP_PHASE { : 'community.wave.seqera.io/library/whatshap:2.8--7fe530bc624a3e5a' }" input: - tuple val(meta), path(vcf), path(tbi), path(bam), path(bai) + tuple val(meta), path(vcf), path(tbi), path(bam), path(bai), path(pedigree) tuple val(meta2), path(fasta), path(fai) output: @@ -22,6 +22,7 @@ process WHATSHAP_PHASE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_ped = pedigree ? "--ped ${pedigree}" : "" if ("${vcf}" == "${prefix}.vcf" || "${vcf}" == "${prefix}.vcf.gz") { error("Input and output names are the same, set prefix in module configuration to disambiguate!") diff --git a/modules/nf-core/whatshap/phase/meta.yml b/modules/nf-core/whatshap/phase/meta.yml index 316ca4cec4a2..98d344f0ba7d 100644 --- a/modules/nf-core/whatshap/phase/meta.yml +++ b/modules/nf-core/whatshap/phase/meta.yml @@ -41,6 +41,10 @@ input: type: file description: BAM index file (optional but recommended) pattern: "*.bai" + - pedigree: + type: file + description: Pedigree file (optional) + pattern: "*.ped" - - meta2: type: map description: | diff --git a/modules/nf-core/whatshap/phase/tests/main.nf.test b/modules/nf-core/whatshap/phase/tests/main.nf.test index 03d38f868894..e12054152b95 100644 --- a/modules/nf-core/whatshap/phase/tests/main.nf.test +++ b/modules/nf-core/whatshap/phase/tests/main.nf.test @@ -37,6 +37,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/NA03697B2_new.pbmm2.repeats.vcf.gz.csi', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam.bai', checkIfExists: true), + [], ] input[1] = Channel.of([ @@ -73,6 +74,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/NA03697B2_new.pbmm2.repeats.vcf.gz.csi', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam.bai', checkIfExists: true), + [], ] input[1] = Channel.of([ From 73e04d2871cd649f42b2b487aa9c52be1ec74f01 Mon Sep 17 00:00:00 2001 From: "felix.vandermeeren@chu-montpellier.fr" Date: Tue, 7 Apr 2026 14:22:35 +0200 Subject: [PATCH 2/4] FIX: forgot to pass new input_ped --- modules/nf-core/whatshap/phase/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nf-core/whatshap/phase/main.nf b/modules/nf-core/whatshap/phase/main.nf index cdc8bef46208..8ea7494688dd 100644 --- a/modules/nf-core/whatshap/phase/main.nf +++ b/modules/nf-core/whatshap/phase/main.nf @@ -33,6 +33,7 @@ process WHATSHAP_PHASE { --output ${prefix}.vcf \\ --reference ${fasta} \\ ${args} \\ + ${input_ped} \\ ${vcf} \\ ${bam} From 04f35fae692751ec9ad17fb36781dc61360a3427 Mon Sep 17 00:00:00 2001 From: "felix.vandermeeren@chu-montpellier.fr" Date: Tue, 7 Apr 2026 14:53:54 +0200 Subject: [PATCH 3/4] Use available pedigree file for testing --- modules/nf-core/whatshap/phase/tests/main.nf.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/whatshap/phase/tests/main.nf.test b/modules/nf-core/whatshap/phase/tests/main.nf.test index e12054152b95..dcf94da3b2a7 100644 --- a/modules/nf-core/whatshap/phase/tests/main.nf.test +++ b/modules/nf-core/whatshap/phase/tests/main.nf.test @@ -37,7 +37,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/NA03697B2_new.pbmm2.repeats.vcf.gz.csi', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam.bai', checkIfExists: true), - [], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/FAM.ped', checkIfExists: true), ] input[1] = Channel.of([ @@ -74,7 +74,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/NA03697B2_new.pbmm2.repeats.vcf.gz.csi', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam.bai', checkIfExists: true), - [], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/FAM.ped', checkIfExists: true), ] input[1] = Channel.of([ From 71f7a54aa4203e0acfd85fe24ea797866eb22755 Mon Sep 17 00:00:00 2001 From: "felix.vandermeeren@chu-montpellier.fr" Date: Tue, 7 Apr 2026 16:02:52 +0200 Subject: [PATCH 4/4] FIX: whatshap/haplotag needs update too --- modules/nf-core/whatshap/haplotag/tests/main.nf.test | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nf-core/whatshap/haplotag/tests/main.nf.test b/modules/nf-core/whatshap/haplotag/tests/main.nf.test index 7d0d32006b65..bffb95bd6515 100644 --- a/modules/nf-core/whatshap/haplotag/tests/main.nf.test +++ b/modules/nf-core/whatshap/haplotag/tests/main.nf.test @@ -35,6 +35,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/NA03697B2_new.pbmm2.repeats.vcf.gz.csi', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam.bai', checkIfExists: true), + [], ] input[1] = Channel.of([