Skip to content

Commit

Permalink
fix ambigous channel creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-VM committed Oct 25, 2024
1 parent 4ed19cb commit 5a9559c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions subworkflows/local/bakta_dbdownload_run.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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,
[],
[]
)
Expand Down

0 comments on commit 5a9559c

Please sign in to comment.