-
Notifications
You must be signed in to change notification settings - Fork 776
Closed
Labels
Description
Bug report
When using the strict syntax (NXF_SYNTAX_PARSER=v2), the value of params.outputDir used in pipeline reports file paths (i.e. timeline, report, trace, dag) in nextflow.config is not overridden by command line.
Expected behavior and actual behavior
With the nextflow.config below, different behaviours are observed when running a pipeline with v1 and or v2 syntax:
params {
outputDir = 'results'
}
timeline {
enabled = true
file = "${params.outputDir}/pipeline_info/execution_timeline_${new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')}.html"
}
report {
enabled = true
file = "${params.outputDir}/pipeline_info/execution_report_${new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')}.html"
}
trace {
enabled = true
file = "${params.outputDir}/pipeline_info/execution_trace_${new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')}.txt"
}
dag {
enabled = true
file = "${params.outputDir}/pipeline_info/pipeline_dag_${new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')}.html"
}
- with NXF_SYNTAX_PARSER=v1:
- adding either
--outputDir other_resultsor--output-dir other_resultsto thenextflow runcommand will override the value ofparams.outputDirthroughout the pipeline, including for the timeline, report, trace, tag report files with files paths defined in thenextflow.config
- adding either
- with NXF_SYNTAX_PARSER=v2:
- adding either
--outputDir other_resultsor--output-dir other_resultsto thenextflow runcommand will only override the value ofparams.outputDirfor regular outputs; the timeline, report, trace, tag report files with files path defined in thenextflow.configwill still be save inresults
- adding either
- with either v1 or v2 sintax, adding
-output-dir other_results(one dash at the start, not 2 dashes, as mentioned in current Nextflow documentation does not override params.outputDir at all
Steps to reproduce the problem
With the nextflow.config lines above, run a Nextlfow pipeline with identical parameters first with v1 syntax ( export NXF_SYNTAX_PARSER=v1) then with v2 syntax (export NXF_SYNTAX_PARSER=v2) and examine outputs
Program output
with v1 syntax:
- adding either
--outputDir other_resultsor--output-dir other_resultsto thenextflow runcommand leads to all pipeline outputs and the timeline, report, trace, tag reports begin saved inother_results(as expected)
with v2 syntax:
- adding either
--outputDir other_resultsor--output-dir other_resultsto thenextflow runcommand leads to:- pipeline outputs being saved in
other_results(as expected) - timeline, report, trace, tag reports are saved in
results(the outputDir value coded in thenextflow.config), not inother_results- this is not expected
- pipeline outputs being saved in
Environment
- Nextflow version: 25.04.6 build 5954
- Java version: openjdk version "17.0.16"
- Operating system: Ubuntu 24.04 LTS
- Bash version: GNU bash, version 5.1.16
Reactions are currently unavailable