Skip to content

Adjusted to new strict syntax of nextflow version 26.04 - #289

Open
DataSpott wants to merge 1 commit into
masterfrom
quick_syntax_fix
Open

Adjusted to new strict syntax of nextflow version 26.04#289
DataSpott wants to merge 1 commit into
masterfrom
quick_syntax_fix

Conversation

@DataSpott

Copy link
Copy Markdown
Collaborator

With Nextflow version 26.04, the strict syntax is further enforced.
Applied a fix to all processes/modules (see below). Additionally, introduced "USER" as new
params.variable in the nextflow.config to use it in workflow profiles.

Fix-description:
In consequence, a process only knows about variables once the input block is introduced.
This results in a problem with publishDir, which typically uses variables such as ${name} to describe paths and patterns.
E.g:

process ShowError{
    publishDir "${params.output}/path/to/${name}", mode: 'copy', pattern: "${name}"
    
    input:
        tuple val(name), path(file)
    ...
}

A simple fix is to put the publishDir-strings with yet-undefined variables in closures (curly brackets "{}") so they are interpreted at runtime:

process ShowError{
    publishDir { "${params.output}/path/to/${name}" }, mode: 'copy', pattern: { "${name}" }
    
    input:
        tuple val(name), path(file)
    ...
}

@DataSpott DataSpott self-assigned this Jul 17, 2026
@DataSpott DataSpott added the bug Something isn't working label Jul 17, 2026
@replikation

Copy link
Copy Markdown
Owner

the min version also needs to be updated or?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants