Workflow Composition Isolation #2306
-
Hello! I'm wondering if anyone could help me with a problem I'm having with dsl2 and workflow composition. I am trying to run two workflows in parallel from a main workflow by doing something like [a-first-time-second-time, a-first-time] but it actually outputs: [b-first-time-second-time, b-first-time] I'm new to nextflow so this could totally be a misunderstanding but any help would be greatly appreciated.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @qscacheri , answering for posterity since no one ever answered you. This is a common pitfall when learning how to write Nextflow pipelines. Basically, processes do not necessarily emit outputs in the same order as the inputs, so in this case Additionally, the |
Beta Was this translation helpful? Give feedback.
Hi @qscacheri , answering for posterity since no one ever answered you. This is a common pitfall when learning how to write Nextflow pipelines. Basically, processes do not necessarily emit outputs in the same order as the inputs, so in this case
bar.out
andbaz.out
may not have the same order. You should always add some metadata (e.g. id) to each item so that you can recombine outputs later on.Additionally, the
combine
operator does an outer product whereas it looks like you wanted an inner product. For that you should usejoin
.