split a tuple with id + items #3785
Answered
by
mribeirodantas
rossijulieta
asked this question in
Q&A
-
Hi all, I tried to reduce my problem to the minimum in the following example; I have a channel like ch1 with a number representing an id and then a list of values and need to split it so that it looks like the expected values as commented bellow (id + each value). nextflow.enable.dsl=2 // expected -> [1,'a'], [1,'b'],[1,'c'],[2,'y'],[2,'z'] Any hint would be appreciated. |
Beta Was this translation helpful? Give feedback.
Answered by
mribeirodantas
Mar 22, 2023
Replies: 1 comment 2 replies
-
The
Output:
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
rossijulieta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
transpose
operator does what you're looking for.Output: