Skip to content

Is channel output from multiMap guaranteed to be in the same order it comes in? #2682

Answered by bentsherman
mahesh-panchal asked this question in Q&A
Discussion options

You must be logged in to vote

I wouldn't be surprised if multiMap preserves the order, but I don't recommend structuring the channels this way. Values that should be tied together, like (samp, x, y) in this example, should be managed as a tuple, even if that means that you have long tuples. Even if multiMap happens to preserve order, who knows what other channel logic might come into play and break that ordering.

As for optional inputs, there are some efforts to improve Nextflow support for optionals (#1694, #2893). I think that would be a better direction to pursue.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@bentsherman
Comment options

@mahesh-panchal
Comment options

@bentsherman
Comment options

@mahesh-panchal
Comment options

@bentsherman
Comment options

Answer selected by mahesh-panchal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants