I may be missing something, but I can't set `outpu...
# random
m
I may be missing something, but I can't set
outputDir
to
params.outdir
https://nextflow.io/docs/latest/tutorials/workflow-outputs.html this works (in that the workflow output writes to
results2
)
Copy code
test.conf:

outputDir = "${projectDir}/results2"

params {
  outdir = "${projectDir}/results1"
}
but this does not (it does not write to
results1
, it writes to the default
results
)
Copy code
test.conf:
params {
  outdir = "${projectDir}/results1"
}

<http://main.nf|main.nf>:
nextflow.preview.output = true

workflow {
  outputDir = params.outdir
}
output { ...
and this also does not
Copy code
test.conf:
params {
  outdir = "${projectDir}/results1"
}

<http://main.nf|main.nf>:
nextflow.preview.output = true

outputDir = params.outdir

workflow { ...
}
output { ...
t
Have you tried putting the parameters (i.e. whatever you have in
params{}
) in a JSON or YAML file and passing that to
nextflow
via
-params-file test.json
?
n
outputDir
is a configuration option. Can you try placing it in the nextflow.config?
m
Same as the first option, I think?
Copy code
nextflow.config:

profiles {
    test {
        includeConfig 'conf/test.config'
    }
}
I need to overwrite that value with
params.outdir
though, since that is what nf-core/tower/seqera platform uses
n
m
Hmm, thanks! Will give that a try. I am worried about order-of-declaration though, is params fully resolved at that point? Meanwhile, created an issue https://github.com/nextflow-io/nextflow/issues/6472 and found a possible workaround
Copy code
nextflow.config:

// do not specify this!
outputDir = ""

test.config:

params {
  outdir = ${projectDir}/test-results
}

<http://main.nf|main.nf>:

workflow {
  ...
}
output {
  vcf {
    path {
      meta -> "${params.outdir}/vcf/${meta[0].id}"
    }
  }
}
n
I have had no issues with my pipelines. Interesting problem though!
m
that's a fun one
m
In the end, I could not get it to work when run from Seqera Platform so I went back to
projectDir
twitching eye
😱 1