Replies: 1 comment
-
No alternative at the moment. For what it's worth, I'm thinking about moving to a paradigm where we use channels of maps instead of channels of tuples (i.e. move everything "into" the meta map). That way you don't have to spell out every tuple element because you only pass around a single map value for each sample: data.filter { sample -> sample.gender == "MALE" }
data.map { sample -> sample + [new_item: "this is new"] } Check out this fetchngs PR if you'd like to learn more, feel free to comment |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
quite often I deal with filtering/mapping operations like
data.filter{meta, _panel, _bam, _bai, _vcf, _tbi, _gt -> meta.gender == "MALE"}
is there any cleaner way to go about it? Something like destructing the tuple items
data.filter { meta, ...rest -> meta.gender == "MALE" }
Similar approach would be valuable for the map operator, too, for example:
data.map{meta, _rest -> [ meta + [new_item: "this is new"], ...rest]}
Has anyone dealt with this, too?
Beta Was this translation helpful? Give feedback.
All reactions