Jonathan Manning
09/28/2026, 10:47 AMrsem-calculate-expression \
--num-threads $task.cpus \
--temporary-folder ./tmp/ \
$alignment_mode \
$strandedness \
$PAIRED_END_FLAG \
$args \
$reads \
$INDEX \
$prefix
github.com/nf-core/modules/blob/…/main.nf#…
Can we encourage a different idiom that allows an override for folks who are confident in doing so:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
if (!args.contains('--temporary-folder')) {
args += ' --temporary-folder ./tmp/'
}
Then folks can e.g. supply the system TMPDIR when they're confident in it, and folks using e.g Fusion that want a scratch dir that doesn't stream back to S3 can override as they want. Does that sound reasonable?
Example: github.com/nf-core/modules/pull/13043Matthieu Muffato
09/28/2026, 2:36 PMext.args ? That still sounds convoluted.
Why not just make the module not do anything, and add --temporary-folder ./tmp to ext.args in your pipeline / institute config as needed.
On HPC where the scratch dir is a network filesystem, users will pay the price of using the working directory immediately. And how should they know that the module has been diverted away from the default TMPDIR ?Jonathan Manning
09/28/2026, 2:40 PM--temporary-folder ./tmp (the hard-coding thing), and so far I've preserved default behaviour.
Are you suggesting it would be better to just strip all default temp dir specs and leave it to users to do via ext.args without module-level defaults?Matthieu Muffato
09/28/2026, 2:51 PM/tmp and in this case we have to use the working dir (network filesystem) and it’s slow …Jonathan Manning
09/28/2026, 2:52 PMMahesh Binzer-Panchal
09/30/2026, 7:46 AMWhy not just make the module not do anything,I think a lot of these hard coded things are there because people have experienced problems and not doing anything was not optimal. I do agree though with the rest of your concerns. For the time being, I would say make the temporary folder an optional input to make it clear that this tool has issues with tmp space, and stick with whatever was implemented by the module author, but now it's overridable.
Simon Pearce
09/30/2026, 4:01 PMtask.ext.tempdir argument...Simon Pearce
09/30/2026, 4:03 PMWhy not just make the module not do anything, and addWell, you can't really add this to the institute config, as ext.args is highly likely to either get overridden by the pipeline defaultto--temporary-folder ./tmpin your pipeline / institute config as needed.ext.args
ext.args or will override those.Simon Pearce
09/30/2026, 4:09 PMJonathan Manning
09/30/2026, 4:10 PMSimon Pearce
09/30/2026, 4:11 PMTMPDIR or similarSimon Pearce
09/30/2026, 4:13 PMSimon Pearce
09/30/2026, 4:14 PMtmp is used 100 times: github.com/search?q=repo%3Anf-core%2Fmod…&type=code
(not all of which are an issue)Matthieu Muffato
09/30/2026, 9:13 PM$TMPDIR by default.: github.com/nextflow-io/nextflow/issues/4587#…Matthieu Muffato
09/30/2026, 9:19 PMparams.tempdir or something, which is not realistic
2. task.ext.args is hard to set for users because there’s no “append” semantics. Someone would have to find what the default value is in the pipeline, and then copy that whilst adding --temp-folder thingy
3. which leaves tark.ext.tempdir as the solution that requires the least work from pipeline developers and is the easiest to use by end users ?