Custom filepaths for workflow-level output

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.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?

Currently (this is a feature still in preview), this is not supported but in the final version what you’re asking will be available :wink:

OK, I’ll wait for the new implementation then. Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.