diff options
author | Pjotr Prins | 2017-03-05 12:39:04 +0000 |
---|---|---|
committer | Pjotr Prins | 2017-03-05 12:39:04 +0000 |
commit | 7ad6aca76c84b0a246fecada8011035d23c8342c (patch) | |
tree | ab755d089a9e976737abc174d15fd6b467ef55f9 | |
parent | 4e95808ebb8bfdfae0f2a16ee54c0b2ae0664c68 (diff) | |
download | genenetwork2-7ad6aca76c84b0a246fecada8011035d23c8342c.tar.gz |
Settings: make sure paths exist when starting server
-rw-r--r-- | etc/default_settings.py | 1 | ||||
-rw-r--r-- | wqflask/utility/tools.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py index 08eae024..97792fed 100644 --- a/etc/default_settings.py +++ b/etc/default_settings.py @@ -67,6 +67,7 @@ HOME=os.environ['HOME'] LOGFILE = HOME+"/genenetwork2.log" GENENETWORK_FILES = HOME+"/gn2_data" # base dir for all static data files LOCAL_PRIVATE_FILES = HOME+"/gn2_private_data" # private static data files +GEMMA_RESULTS_PATH = HOME+"/tmp/gemma_results" # ---- GN2 Executables # Paths to invoked binaries diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 82ef136f..d71a9cef 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -217,13 +217,15 @@ USE_REDIS = get_setting_bool('USE_REDIS') USE_GN_SERVER = get_setting_bool('USE_GN_SERVER') GENENETWORK_FILES = get_setting('GENENETWORK_FILES') -TEMP_TRAITS = get_setting('TEMP_TRAITS') +# TEMP_TRAITS = get_setting('TEMP_TRAITS') PYLMM_COMMAND = pylmm_command() GEMMA_COMMAND = gemma_command() GEMMA_RESULTS_PATH = get_setting('GEMMA_RESULTS_PATH') +assert_dir(GEMMA_RESULTS_PATH) PLINK_COMMAND = plink_command() TEMPDIR = tempdir() # defaults to UNIX TMPDIR +assert_dir(TEMPDIR) from six import string_types @@ -240,6 +242,7 @@ if os.environ.get('WQFLASK_OVERRIDES'): OVERRIDES[k] = cmd logger.debug(OVERRIDES) +assert_file(get_setting("GENENETWORK_FILES")+"/auwerx/PheWAS_pval_EMMA_norm.RData") assert_dir(get_setting("JS_BIODALLIANCE")) assert_file(get_setting("JS_BIODALLIANCE")+"/build/dalliance-all.js") assert_file(get_setting("JS_BIODALLIANCE")+"/build/worker-all.js") |