aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/tools.py
diff options
context:
space:
mode:
authorPjotr Prins2016-09-25 10:02:28 +0000
committerPjotr Prins2016-09-25 10:02:28 +0000
commit55b332d6f03f20054902dabb7beeaaebef2139ac (patch)
tree9c6d98d828da28269a64a560625f07537306ba58 /wqflask/utility/tools.py
parentaabc6abba32a635db16dca8dc4df5c3085f18806 (diff)
downloadgenenetwork2-55b332d6f03f20054902dabb7beeaaebef2139ac.tar.gz
Make sure MAPPING_PATH exists
Diffstat (limited to 'wqflask/utility/tools.py')
-rw-r--r--wqflask/utility/tools.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 907b0d6a..22779739 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -93,6 +93,10 @@ def gemma_command(guess=None):
def plink_command(guess=None):
return valid_bin(get_setting("PLINK_COMMAND",guess))
+def flat_file_exists(subdir):
+ base = get_setting("GENENETWORK_FILES")
+ return valid_path(base+"/"+subdir)
+
def flat_files(subdir=None):
base = get_setting("GENENETWORK_FILES")
if subdir:
@@ -104,6 +108,7 @@ def assert_dir(dir):
raise Exception("ERROR: can not find directory "+dir)
return dir
+
def mk_dir(dir):
if not valid_path(dir):
os.makedirs(dir)
@@ -187,7 +192,8 @@ LOG_BENCH = get_setting_bool('LOG_BENCH')
LOG_FORMAT = "%(message)s" # not yet in use
USE_REDIS = get_setting_bool('USE_REDIS')
USE_GN_SERVER = get_setting_bool('USE_GN_SERVER')
-GENENETWORK_FILES = get_setting_bool('GENENETWORK_FILES')
+
+GENENETWORK_FILES = get_setting('GENENETWORK_FILES')
PYLMM_COMMAND = pylmm_command()
GEMMA_COMMAND = gemma_command()