Skip to content

"nextflow module run" with multiple optional path inputs ? #7161

@tetedange13

Description

@tetedange13

Bug report

Cannot find how to specify (multiple) optional path input with nextflow module run

Expected behavior and actual behavior

I do not know exactly which is the "expected" behaviour here, but actual is impossibilty to run a module with multiple optional path inputs

Steps to reproduce the problem

nextflow-26.04.1-dist module run -with-singularity nf-core/deepvariant/rundeepvariant \
    --meta.id test \
    --input https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam \
    --index https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai \
    --intervals "" \
    --meta2.id fasta \
    --fasta https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/genome/genome.fasta \
    --meta3.id fai \
    --fai https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/genome/genome.fasta.fai \
    --meta4.id gzi \
    --gzi "" \
    --meta5.id par \
    --par_bed "" \
    --outdir test_out

And dv.config containing

process {
  withName: DEEPVARIANT_RUNDEEPVARIANT {
    ext.args = "--model_type WGS"
  }
}

Program output

Multiple possible errors depending on what I tried :

  • All optional inputs to <empty_string> or <empty_list> -> input file name collision
  • Put different fake filenames (not existing) -> tool error when it tries to handle non-existing file
  • Excluding optional inputs from command-line -> Missing required parameter

Environment

  • Nextflow version: 26.04.1
  • Java version: openjdk 23.0.2-internal 2025-01-21
  • Operating system: Linux
  • Bash version: GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)

Additional context

In above command, multiple path inputs are optional, these are for sure (based on module code) :

  • intervals (from 1st meta tuple)
  • tuple val(meta4), path(gzi)
  • tuple val(meta5), path(par_bed)

Attached .module.log : module.log.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions