Skip to content

Bug in running function within publishDir block #6512

@gevro

Description

@gevro

Hi,
In nextflow 25.04.3, this worked:

Defined functions at the top of the nextflow script:

sampleBaseDir = { individual_id, sample_id -> "${params.analysis_output_dir}/${params.analysis_id}.${individual_id}.${sample_id}" }
dirProcessReads = { individual_id, sample_id -> "${sampleBaseDir(individual_id, sample_id)}/processedReads" }

Then in a process do:

publishDir { dirProcessReads(individual_id, sample_id) }, mode: 'link'

But in nextflow 25.10.0, this is giving an error:

ERROR ~ Unexpected error while finalizing task 'mergeAlignedSampleBAMs (mergeAlignedSampleBAMs: SampleID' - cause: No such property: individual_id for class: nextflow.script.dsl.ProcessDslV1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions