Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic path for publish section #5090

Open
Puumanamana opened this issue Jun 25, 2024 · 0 comments
Open

Dynamic path for publish section #5090

Puumanamana opened this issue Jun 25, 2024 · 0 comments

Comments

@Puumanamana
Copy link

Hello,

I'm trying out the new publish feature introduced in version 24.04.0, but wasn't able to figure out the right implementation in my case.
In my current pipeline, a single workflow execution can process multiple datasets at the same time, so I need to publish each process output to the correct output directory (matching its dataset). I'm currently doing that using a closure that takes the dataset field of the map associated to each channel element.
Here's a snapshot of my publishDir directive:

publishDir = [
  path: { meta, output -> "results/$meta.dataset/${task.process.split(':')[-1]}" }
]

With the new syntax, files can be published with the >> operator within a process or workflow in the publish section. However, I couldn't identify in the documentation how to add a dynamic directive with a closure applied to the objects being published (if it's still possible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant