From 51625908329280edad1e84e1733b460759260d2f Mon Sep 17 00:00:00 2001
From: Valentina Galata <valentina.galata@uni.lu>
Date: Thu, 15 Oct 2020 14:17:32 +0200
Subject: [PATCH] init: allow null value for host_refs for bbmap in config

---
 workflow/rules/init.smk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/workflow/rules/init.smk b/workflow/rules/init.smk
index c9b6749..64565ba 100644
--- a/workflow/rules/init.smk
+++ b/workflow/rules/init.smk
@@ -29,7 +29,7 @@ if config["data"]["metat"]["sr"]["r1"] and config["data"]["metat"]["sr"]["r2"]:
 NO_BASECALLING = config["data"]["metag"]["ont"]["fastq"] and os.path.exists(config["data"]["metag"]["ont"]["fastq"])
 
 # Whether host contamination has to be removed - only if host references are given
-NO_HOST_FILTERING = len(config["bbmap"]["host_refs"].keys()) == 0
+NO_HOST_FILTERING = config["bbmap"]["host_refs"] is None or len(config["bbmap"]["host_refs"].keys()) == 0
 
 # Assemblers and read types
 META_TYPES = ["metag"]
-- 
GitLab