This example is from the nextflow docs
process basicExample {
input:
val x
"echo process job $x"
}
workflow {
def num = Channel.of(1,2,3)
basicExample(num)
}
It says output should be similar to:
process job 3
process job 1
process job 2
However, I only see one of these outputs. For example: process job 2
when I look in .command.out
. Note, that there is only one folder in db/9217e2 folder with one .command.out
file.
$> find "work/db/" -name ".command.out"
work/db/9217e2451637514ea8ab5791fbcca4/.command.out
N E X T F L O W ~ version 23.10.0
Launching `../../nextflow/channelexample.nf` [festering_stonebraker] DSL2 - revision: 110bfce0a9
executor > local (3)
[db/9217e2] process > basicExample (3) [100%] 3 of 3 ✔
Nextflow defaults to iterating each process over a list of inputs. So each process will only have 1 output, and your input will be in a random order.
If you want to use all inputs in one process it would be something like this:
And another way to better monitor your jobs if you're iterating over a list is to use
tag
.This will then put your output to something like this, where x is the value of $x the process is using: