Commit b95a495f authored by Jean Mainguy's avatar Jean Mainguy
Browse files

add additional checking for kaiju db dir

parent a4d66930
......@@ -27,8 +27,15 @@ workflow DATABASES {
} else if (params.kaiju_db_dir) {
if (file(params.kaiju_db_dir + "/kaiju_db*.fmi").size == 1) {
ch_kaiju_db = Channel.value([file(params.kaiju_db_dir + "/nodes.dmp"), file(params.kaiju_db_dir + "/kaiju_db*.fmi"), file(params.kaiju_db_dir + "/names.dmp")])
} else {
exit 1, "There is more than one file ending with .fmi in ${params.kaiju_db_dir}"
}
else if (!file(params.kaiju_db_dir).isDirectory()) {
exit 1, "kaiju_db_dir ${params.kaiju_db_dir} does not exists."
}
else if (file(params.kaiju_db_dir + "/kaiju_db*.fmi").size > 1) {
exit 1, "There is more than one file ending with .fmi in kaiju_db_dir: ${params.kaiju_db_dir}"
}
else if (file(params.kaiju_db_dir + "/kaiju_db*.fmi").size == 0) {
exit 1, "There is no file ending with .fmi in kaiju_db_dir: ${params.kaiju_db_dir}"
}
} else {
exit 1, "You must specify --kaiju_db_url or --kaiju_db_dir"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment