From 16a3556bfcfddf8195bbcd486653325aaa1de4ee Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Wed, 13 Apr 2022 08:26:08 +0200 Subject: [PATCH] Changes after code review --- workflows/taxprofiler.nf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workflows/taxprofiler.nf b/workflows/taxprofiler.nf index 7c02f4c..58671b3 100644 --- a/workflows/taxprofiler.nf +++ b/workflows/taxprofiler.nf @@ -139,15 +139,16 @@ workflow TAXPROFILER { meta_new.remove('run_accession') [ meta_new, reads ] } - .groupTuple(by: 0) + .groupTuple() .map { meta, reads -> [ meta, reads.flatten() ] } .branch { + meta, reads -> // we can't concatenate files if there is not a second run, we branch // here to separate them out, and mix back in after for efficiency - cat: ( it[0]['single_end'] && it[1].size() > 1 ) || ( !it[0]['single_end'] && it[1].size() > 2 ) + cat: ( meta.single_end && reads.size() > 1 ) || ( !meta.single_end && reads.size() > 2 ) skip: true }