I need to build a pipeline where 2nd process starts after completion of the 1st process and the 3rd after 2nd. As I understand nextflow's processes run parallel. But I need it to run in a order 1st>2nd>3rd processes and so on. Because each process runs on an array and produce multiple outputs which are used by the next. If they run paralleled, the 2nd process may look for input 20 whereas the 1st process produced output 10 and then the process stops, because the command in the 2nd process does not find the input. Is there any way to accomplish this. I tried as follows:
process A{
input:
tuple val(some_name), path(some path) from some_channel
output:
tuple val(some val), path(some path) into A_some_ch
tuple va(some other va), path(some other path) into A_some_other_ch
val true into done_ch
script:
"""
some command out some files
some other command out some other files
"""
}
process B {
input:
val flag from done_ch
val (some val), path(some path) from A_some_ch
val (some other val), path(some other path) from A_some_other_ch
output:
some val and path
script:
"""
some commands out some files
"""
}
I got the idea using of flag from here: https://github.com/nextflow-io/patterns/blob/master/docs/mock-dependency.adoc
But if I use the flag, I got:
Operation 'set' does not allow more than one target name
Does it clarify the issue? Any Help? Best, Zillur