From 890f44cca27169b91db63844501cae4acb133f86 Mon Sep 17 00:00:00 2001 From: Daniel-VM Date: Thu, 24 Oct 2024 13:59:20 +0200 Subject: [PATCH 1/4] fix bakta running only for one sample --- subworkflows/local/bakta_dbdownload_run.nf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/subworkflows/local/bakta_dbdownload_run.nf b/subworkflows/local/bakta_dbdownload_run.nf index 675adcbe..6822ba67 100644 --- a/subworkflows/local/bakta_dbdownload_run.nf +++ b/subworkflows/local/bakta_dbdownload_run.nf @@ -43,9 +43,14 @@ workflow BAKTA_DBDOWNLOAD_RUN { // // MODULE: BAKTA, gene annotation // + // Setup input channel for Bakta process + ch_fasta + .combine(ch_baktadb) + .set{ ch_to_bakta } + ch_to_bakta.view() BAKTA_BAKTA ( - ch_fasta, - ch_baktadb, + ch_to_bakta.map{ meta, fasta, bakta_db -> [meta, fasta] }, + ch_to_bakta.map{ meta, fasta, bakta_db -> bakta_db }, [], [] ) From 9e622f147d3f2515741c8e219954e5e7704db653 Mon Sep 17 00:00:00 2001 From: Daniel-VM Date: Thu, 24 Oct 2024 14:04:21 +0200 Subject: [PATCH 2/4] add changelog in #178 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e314323f..33ee3cd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [#178](https://github.com/nf-core/bacass/pull/178) Fixed bakta running only for one sample. - [#169](https://github.com/nf-core/bacass/pull/169) Fixed long reads polishing input channel. - [#168](https://github.com/nf-core/bacass/pull/168) Fix wrong metadata in canu input channel. - [#163](https://github.com/nf-core/bacass/pull/163) Fixed `params.save_merged` to properly save merged files. From 4ed19cbd9d17746a864d335c9148db11061d4e99 Mon Sep 17 00:00:00 2001 From: Daniel VM <69470278+Daniel-VM@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:24:14 +0200 Subject: [PATCH 3/4] remove view operator Co-authored-by: Jasmin Frangenberg <73216762+jasmezz@users.noreply.github.com> --- subworkflows/local/bakta_dbdownload_run.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/subworkflows/local/bakta_dbdownload_run.nf b/subworkflows/local/bakta_dbdownload_run.nf index 6822ba67..d5fc41be 100644 --- a/subworkflows/local/bakta_dbdownload_run.nf +++ b/subworkflows/local/bakta_dbdownload_run.nf @@ -47,7 +47,6 @@ workflow BAKTA_DBDOWNLOAD_RUN { ch_fasta .combine(ch_baktadb) .set{ ch_to_bakta } - ch_to_bakta.view() BAKTA_BAKTA ( ch_to_bakta.map{ meta, fasta, bakta_db -> [meta, fasta] }, ch_to_bakta.map{ meta, fasta, bakta_db -> bakta_db }, From 5a9559c3c27123082048bc9f6953d12f763c247a Mon Sep 17 00:00:00 2001 From: Daniel-VM Date: Fri, 25 Oct 2024 10:08:04 +0200 Subject: [PATCH 4/4] 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 d5fc41be..8b3c1fdb 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, [], [] )