How to parallel execution of different processes #3813
Answered
by
mribeirodantas
DescartesM
asked this question in
Q&A
-
The scene is described in the above figure; Each process has input and output, and the process B and process C use the same input from process A; Question:
|
Beta Was this translation helpful? Give feedback.
Answered by
mribeirodantas
Mar 30, 2023
Replies: 1 comment
-
PROCESS_A(some, inputs, that, you want)
| PROCESS_B & PROCESS_C
| mix
| PROCESS_D Check the example below: process PROCESS_A {
input:
val x
output:
val y
exec:
y = x*10
}
process PROCESS_B {
input:
val x
output:
val y
when:
x <= 50
exec:
y = x*10
}
process PROCESS_C {
input:
val x
output:
val y
when:
x > 50
exec:
y = x*10
}
process PROCESS_D {
debug true
input:
val x
output:
stdout
script:
"""
echo $x
"""
}
workflow {
Channel
.of(1..10)
| PROCESS_A
| PROCESS_B & PROCESS_C
| mix
| PROCESS_D
} If you don't want to use the process PROCESS_D {
debug true
input:
val x
val y
output:
stdout
script:
"""
echo $x
echo $y
"""
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
DescartesM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check the example below:
If you don't want to use the
mix
channel operator, you can remove this line and change PROCESS_D to exp…