Skip to content
Discussion options

You must be logged in to vote

It was me 😄

You can convert queue channels to value channels through operators returning a single value, such as first, last, collect, count, min, max, reduce, and sum. Regular variables passed as inputs to Nextflow processes will also automatically be converted to value channels. You can see there is no poison pill because the process below spans 3 tasks, even though the second input is a single value:

process FOO {
  debug true
  input:
    val x
    val y
  output:
    stdout
  """
  echo $x $y
  """
}

workflow {
  FOO(Channel
    .of(1,
        2,
        3),
    'a')
}

The output is:

N E X T F L O W  ~  version 22.10.4
Launching `ex2.nf` [distracted_minsky] DSL2 - revision: 8401e42…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

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

This discussion was converted from issue #3521 on January 03, 2023 17:19.