From 5a9559c3c27123082048bc9f6953d12f763c247a Mon Sep 17 00:00:00 2001 From: Daniel-VM Date: Fri, 25 Oct 2024 10:08:04 +0200 Subject: [PATCH] fix ambigous channel creation --- subworkflows/local/bakta_dbdownload_run.nf | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/subworkflows/local/bakta_dbdownload_run.nf b/subworkflows/local/bakta_dbdownload_run.nf index d5fc41b..8b3c1fd 100644 --- a/subworkflows/local/bakta_dbdownload_run.nf +++ b/subworkflows/local/bakta_dbdownload_run.nf @@ -25,16 +25,14 @@ workflow BAKTA_DBDOWNLOAD_RUN { // MODULE: untar database UNTAR( ch_baktadb_tar ) - ch_baktadb = UNTAR.out.untar.map{ meta, db -> db } + ch_path_baktadb = UNTAR.out.untar.map{ meta, db -> db } ch_versions = ch_versions.mix(UNTAR.out.versions) - } else { - ch_baktadb = Channel.from(ch_path_baktadb).map{ db -> db } } } else if (!ch_path_baktadb && val_baktadb_download){ // MODULE: Downlado Bakta database from zenodo BAKTA_BAKTADBDOWNLOAD() - ch_baktadb = BAKTA_BAKTADBDOWNLOAD.out.db - ch_versions = ch_versions.mix(BAKTA_BAKTADBDOWNLOAD.out.versions) + ch_path_baktadb = BAKTA_BAKTADBDOWNLOAD.out.db + ch_versions = ch_versions.mix(BAKTA_BAKTADBDOWNLOAD.out.versions) } else if (!ch_path_baktadb && !val_baktadb_download ){ exit 1, "The Bakta database argument is missing. To enable the workflow to access the Bakta database, please include the path using '--baktadb' or use '--bakdtadb_download true' to download the Bakta database." @@ -44,12 +42,9 @@ workflow BAKTA_DBDOWNLOAD_RUN { // MODULE: BAKTA, gene annotation // // Setup input channel for Bakta process - ch_fasta - .combine(ch_baktadb) - .set{ ch_to_bakta } BAKTA_BAKTA ( - ch_to_bakta.map{ meta, fasta, bakta_db -> [meta, fasta] }, - ch_to_bakta.map{ meta, fasta, bakta_db -> bakta_db }, + ch_fasta, + ch_path_baktadb, [], [] )