Skip to content

Instantly share code, notes, and snippets.

@robsyme
Created June 14, 2023 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robsyme/eab3e935c6a325e9824eb0a1aa49f28d to your computer and use it in GitHub Desktop.
Save robsyme/eab3e935c6a325e9824eb0a1aa49f28d to your computer and use it in GitHub Desktop.
process A {
input: val(name)
output: tuple val(name), path("*")
script: "echo hello $name > greeting.${name}.txt"
}
process B {
input: val(name)
output: tuple val(name), path("*")
script: "echo goodbye $name > farewell.${name}.txt"
}
process C {
input: tuple val(name), path(greeting), path(farewell)
output: tuple val(name), path("all.txt")
script: "cat $greeting $farewell > all.txt"
}
workflow {
Channel.of("Rob", "Ben", "Nathan")
| ( A & B )
A.out
| join(B.out)
| C
| view
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment