Are there any `groupTuple`/`groupKey` magicians ar...
# rubber-duck
m
Are there any `groupTuple`/`groupKey` magicians around? I’ve got a channel of
[meta, bam]
of which I want to gather and join the elements by
meta.samplename
. The catch is the channel elements can have a different amount of chuncks per
meta.samplename
. I’m looking for a non blocking way to count all the elements in channel per
meta.samplename
so I can make a
groupKey
Current code is in https://github.com/nf-cmgg/preprocessing/blob/dev/subworkflows/local/fastq_to_aligned_cram/main.nf#L68-L98. Here I first try to join on the amount of scattered
meta.chunks
and then on the amount of replicates in
meta.count
cc @Nicolas Vannieuwkerke
m
are you calling team sarek?
m
I invoke the ancient rites and call upon team #CGFUX04HZ to rid me of my woes
maxime 3
cauldron
n
all hail
m
We're prepping a PR, but I'll ping the supreme sorceress of the groupKey magic once we're done
❤️ 1
it is beautiful though
n
I figured out the specific issue in our pipeline but still interesting to see how you guys do it 👀
m
so what was the issue for you?
n
A meta map got the samplename ID instead of the lane ID before a groupTuple where we merge files from the same lane. This caused some weird behaviour when the lanes had different amount of files 😛
m
yeah, I understand the issue
🎉 1
m
We’re prepping a PR, but I’ll ping the supreme sorceress of the groupKey magic once we’re done
I’m still curious what you had in store though 😉