Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/nf-core/whatshap/haplotag/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
4 changes: 3 additions & 1 deletion modules/nf-core/whatshap/phase/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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!")
Expand All @@ -32,6 +33,7 @@ process WHATSHAP_PHASE {
--output ${prefix}.vcf \\
--reference ${fasta} \\
${args} \\
${input_ped} \\
${vcf} \\
${bam}

Expand Down
4 changes: 4 additions & 0 deletions modules/nf-core/whatshap/phase/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 2 additions & 0 deletions modules/nf-core/whatshap/phase/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/FAM.ped', checkIfExists: true),
]

input[1] = Channel.of([
Expand Down Expand Up @@ -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),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/vcf/FAM.ped', checkIfExists: true),
]

input[1] = Channel.of([
Expand Down
Loading