From cfadba521f0a0dbb300edfdb442fb145f1b304b1 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 17 Aug 2018 14:28:50 +0200 Subject: [PATCH] Fix containsKey if no genome is used --- main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.nf b/main.nf index acd1cedd9..6dff222b1 100644 --- a/main.nf +++ b/main.nf @@ -95,8 +95,8 @@ if (params.help){ } // Check if genome exists in the config file -if (!params.genomes.containsKey(params.genome) && params.genome) { - exit 1, "The provided genome '${params.genome}' is not available in the iGenomes file. Currently the available genomes are ${params.genomes.keySet().join(", ")}" +if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { + exit 1, "The provided genome '${params.genome}' is not available in the iGenomes file. Currently the available genomes are ${params.genomes.keySet().join(", ")}" } // Configurable variables