In a previously fine nextflow.config
file, a set of linting issues suddenly appeared.
In
params {
// Timestamps config
raw_timestamp = java.time.LocalDateTime.now()
timestamp = String.format('%tFT%<tH:%<tM', raw_timestamp)
month_folder = String.format('/%tY/%<tm', raw_timestamp)
}
the linter complains about raw_timestamp
is not defined` in the two lines where it is used.
In
profiles {
standard {
process {
executor = 'local'
resourceLimits = [ cpus: params.max_cpus, memory: params.max_memory, time: params.max_time ]
}
}
cluster {
process {
executor = 'slurm'
resourceLimits = [ cpus: params.max_cpus, memory: params.max_memory, time: params.max_time ]
}
executor {
jobName = { "PipelineName-${task.name.replaceAll(" ", "_")}" }
queueSize = 20000
}
}
}
the definition of jobName
in profiles.cluster.executor
complains about Dynamic config options are only allowed in the 'process' scope
. It also tells me that 'task' is not defined
. Should I move that definition to the process scope above?
Finally, in
process {
...
withName: 'PROCESS_NAME' {
publishDir = [
path: {
meta.Name ?
"$params.outdir/$meta.Name"
: "$params.outdir/$meta.OtherName"
},
pattern: "*.report.json",
mode: "link"
]
}
...
}
it complains about 'meta' is not defined
. How could I solve this?
All the definitions work flawlessly, so despite some things “not being defined”, the runtime finds it in place.