I’m very excited about Nextflow’s new workflow-level output feature, but am still getting the hang of actually using it. One question I have is: is it possible to customize the filename (not just the directory) of files that are published this way? Or am I stuck with whatever filenames are specified in the original process?
E.g. Say I have a module FOO
with some fairly generic output filename, bar.txt
. I’d like to call FOO
within a workflow and then publish it at the workflow level. Following the documentation at the link above gives me something like this:
workflow {
FOO()
publish:
FOO.out >> "mydir"
}
output {
directory 'results'
}
Based on my understanding, this will publish the file at results/mydir/bar.txt
. Is that correct? If so, is there a way I can instead publish it with a flatter and more informative filepath, e.g. results/myfile.txt
, without modifying the code of the module itself?