From da52285c89365bcb81186e22497cb32c6ed1b129 Mon Sep 17 00:00:00 2001 From: "Diego Alvarez S." Date: Thu, 31 Oct 2024 20:27:28 -0300 Subject: [PATCH] Fix gunc --- subworkflows/local/bin_qc.nf | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/subworkflows/local/bin_qc.nf b/subworkflows/local/bin_qc.nf index 3f25e7dd..b87e7998 100644 --- a/subworkflows/local/bin_qc.nf +++ b/subworkflows/local/bin_qc.nf @@ -132,9 +132,13 @@ workflow BIN_QC { /* * GUNC */ - ch_input_bins_for_gunc = ch_bins.filter { meta, _bins -> - meta.domain != "eukarya" - } + ch_input_bins_for_gunc = ch_bins + .filter { meta, _bins -> + meta.domain != "eukarya" + } + .flatMap { meta, bins -> + bins.collect { bin -> [meta, bin] } + } if ( params.gunc_db ) { ch_db_for_gunc = ch_gunc_db @@ -158,10 +162,10 @@ workflow BIN_QC { GUNC_MERGECHECKM(ch_input_to_mergecheckm) ch_versions.mix(GUNC_MERGECHECKM.out.versions) - // Make sure to keep directory in sync with modules.conf - GUNC_MERGECHECKM.out.tsv - .map{it[1]} - .collectFile(name: "gunc_checkm_summary.tsv", keepHeader: true, storeDir: "${params.outdir}/GenomeBinning/QC/") + // Make sure to keep directory in sync with modules.conf + GUNC_MERGECHECKM.out.tsv + .map{it[1]} + .collectFile(name: "gunc_checkm_summary.tsv", keepHeader: true, storeDir: "${params.outdir}/GenomeBinning/QC/") } }