aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2018-03-18 08:51:55 +0300
committerMuriithi Frederick Muriuki2018-03-18 08:51:55 +0300
commit61a9e8663a3fb36ce4afbe26431e74e66621e175 (patch)
treeaa9d44dc39466c620b0fb3decc65625dc6534b26
parented0c0018166166f1dc05905f0aed1fa1930d963b (diff)
downloadgenenetwork2-61a9e8663a3fb36ce4afbe26431e74e66621e175.tar.gz
Check that key exists before using it
* Ensure the key exists in the json object/dictionary, before trying to use it to retrieve a value.
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index 087b95b4..c189fb96 100644
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -114,7 +114,7 @@ class MarkerRegression(object):
self.num_perm = 0
self.perm_output = []
self.bootstrap_results = []
- self.covariates = start_vars['covariates']
+ self.covariates = start_vars['covariates'] if "covariates" in start_vars else None
#ZS: This is passed to GN1 code for single chr mapping
self.selected_chr = -1