You need to you use the same channel as input in two or more processes.
In DSL2, you can just do it! The into operator is no longer needed.
process foo {
input: path x
script:
"""
echo your_command --input $x
"""
}
process bar {
input: path x
script:
"""
echo your_command --input $x
"""
}
workflow {
input_ch = Channel.fromPath("$baseDir/data/prots/*_?.fa")
foo(input_ch)
bar(input_ch)
}
Use the the following command to execute the example:
nextflow run nextflow-io/patterns/channel-duplication.nf