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

Update PublishDir.groovy #1

Merged
merged 1 commit into from
Jun 15, 2023
Merged

Update PublishDir.groovy #1

merged 1 commit into from
Jun 15, 2023

Conversation

dwishsan
Copy link
Owner

Add Closure as possible PublishDir.setMode() input
This is related to nextflow-io#4024

This have been tested and work.

Exemple:

process {
  ext {
    Output_copy = false
  }
  publishDir {
    mode = { task.ext.Output_copy ? 'copy' : 'symlink' }
  }

  withName: 'FOO' {
    ext.Output_copy = true
  }

  withName: 'BAR' {
    ext.Output_copy = false
  }
}

Only results of the FOO process will be copied.

WARNING:
I expect the closure to return a String, so it won't work if it returns null for exemple. Maybe it should handle it?

Add Closure as possible PublishDir.setMode() input

Signed-off-by: dwishsan <[email protected]>
@dwishsan dwishsan merged commit 0d111a8 into master Jun 15, 2023
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

Successfully merging this pull request may close these issues.

1 participant