Skip to content

Commit

Permalink
enable database parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcolq committed May 4, 2023
1 parent a2ab046 commit 44ffc6a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions subworkflows/kraken_pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ workflow kraken_pipeline {
taxonomy = file(params.taxonomy, type: "dir", checkIfExists:true)
}

source_database = source_data.get("database", false)
if (!source_database) {
throw new Exception(
"Error: Source $source_name does not include a database for "
+ "use with kraken, please choose another source, "
+ "provide a custom database or disable kraken.")
}
if (database) {
source_database = database
} else {
source_database = source_data.get("database", false)
if (!source_database) {
throw new Exception(
"Error: Source $source_name does not include a database for "
+ "use with kraken, please choose another source, "
+ "provide a custom database or disable kraken.")
}
database = file(source_database, type: "file")

// start_server(database, taxonomy)
Expand Down

0 comments on commit 44ffc6a

Please sign in to comment.