Skip to content
Discussion options

You must be logged in to vote
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 mix channel operator, you can remove this line and change PROCESS_D to exp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DescartesM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #3812 on March 30, 2023 06:45.