From 32c0d8d6a5ac86475b86f79aa96a373aa14e32a4 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 22 Feb 2023 08:24:48 +0100 Subject: [PATCH] Fix KrakenUniq Taxpasta issue --- subworkflows/local/standardisation_profiles.nf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/subworkflows/local/standardisation_profiles.nf b/subworkflows/local/standardisation_profiles.nf index 2c6a591..ce1ef23 100644 --- a/subworkflows/local/standardisation_profiles.nf +++ b/subworkflows/local/standardisation_profiles.nf @@ -24,17 +24,17 @@ workflow STANDARDISATION_PROFILES { //Taxpasta standardisation ch_input_for_taxpasta = profiles .map { - meta, profile -> - def meta_new = [:] - meta_new.id = meta.db_name - meta_new.tool = meta.tool == 'metaphlan3' ? 'metaphlan' : meta.tool == 'malt' ? 'megan6' : meta.tool - [meta_new, profile] - } - .groupTuple () + meta, profile -> + def meta_new = [:] + meta_new.id = meta.db_name + meta_new.tool = meta.tool == 'metaphlan3' ? 'metaphlan' : meta.tool == 'malt' ? 'megan6' : meta.tool + [meta_new, profile] + } + .groupTuple () + .map { [ it[0], it[1].flatten() ] } TAXPASTA_MERGE (ch_input_for_taxpasta, [], []) - /* Split profile results based on tool they come from */