Merge grouped files from a output channel #2195
Unanswered
zillurbmb51
asked this question in
Q&A
Replies: 0 comments
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,
I was trying to merge chunks of chromosomes into respective chromosome. I tried many ways for many days, posted the issue in github (#2138), stackoverflow (https://stackoverflow.com/questions/67591229/output-files-chromosomal-chunks-merging-in-nextflow) and gitter but still failed to accomplish the task.
The chunks are stored in tuples of output channel, like:
[chr1,[[chr1.chunk1.bgen],[chr1.chunk1.stats]], [chr1,[[chr1.chunk2.bgen],[chr1.chunk2.stats]],[chr1,[[chr1.chunk3.bgen],[chr1.chunk3.stats]]...
How could I get
chr1.merged.bgen
andchr1.merged.stats
? I may usecat
or other tools.I tried to gather all the bgen files together:
my_output_channel.map{chrom,bgens -> tuple(chrom,bgens.findAll{it.endsWith(".bgen")})}.view()
But It gives me empty output
[chr1,[]], [chr1,[]],[chr1,[]]...
Any help?
Beta Was this translation helpful? Give feedback.
All reactions