Below is the code from nextflow site (https://www.nextflow.io/docs/edge/operator.html#grouptuple).
For the output, the first is A B C, and the second is C, A.
Is there a way to make the output like this
[1, [A, B, C]] [2, [A, C]]
That is, the stuff inside [] is in some order.
Channel
.of(
[1, 'A'],
[1, 'B'],
[2, 'C'],
[3, 'B'],
[1, 'C'],
[2, 'A'],
[3, 'D']
)
.groupTuple()
.view()
[1, [A, B, C]]
[2, [C, A]]
[3, [B, D]]