From a5f4fc42d53fce99863a3d135b017b9e468722be Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Tue, 12 Apr 2022 09:25:27 +0200 Subject: [PATCH] Fix run merging for unmerged PE data --- conf/modules.config | 2 +- workflows/taxprofiler.nf | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 97e9510..eb448bb 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -162,7 +162,7 @@ process { } withName: CAT_FASTQ { - ext.prefix = { "${meta.id}-${meta.run_accession}" } + ext.prefix = { "${meta.id}" } publishDir = [ path: { "${params.outdir}/run_merging/" }, mode: params.publish_dir_mode, diff --git a/workflows/taxprofiler.nf b/workflows/taxprofiler.nf index 1da812d..2eb7e8c 100644 --- a/workflows/taxprofiler.nf +++ b/workflows/taxprofiler.nf @@ -139,7 +139,11 @@ workflow TAXPROFILER { meta_new.remove('run_accession') [ meta_new, reads ] } - .groupTuple() + .groupTuple(by: 0) + .map { + meta, reads -> + [ meta, reads.flatten() ] + } .branch { // we can't concate files if there is not a second run, we branch // here to separate them out, and mix after @@ -151,7 +155,6 @@ workflow TAXPROFILER { .mix( ch_reads_for_cat_branch.skip ) .map { meta, reads -> - [ meta, [ reads ].flatten() ] }