Nextflow mixing the ordering of CSV-file rows when using subworkflows #3448
-
It is not really clear to me why, but Nextflow is not respecting the order of rows in the example below. I could try to guess what's going on if we had
Sometimes, this Nextflow pipeline will work just fine. However, in some other times, it will throw:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the A better solution consists in keeping the channel order using the
Note, also that |
Beta Was this translation helpful? Give feedback.
I think the
maxFork
should not be used to force the sequential execution of tasks. nextflow is inherently parallel, therefore it's not guaranteed that different processes will be executed in the expected order (without mention the lack of performance).A better solution consists in keeping the channel order using the
join
operator using thetask.index
value as the joining column. I've rewritten the example for your convenience