From 9f809adc0a03604ae47cc05e0ff51229e2827ed6 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Tue, 7 Mar 2017 10:02:12 +0000 Subject: - Use locate_phewas for phewas files - Use logger instead of print statements --- wqflask/utility/tools.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'wqflask/utility/tools.py') diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index d71a9cef..4d213f4c 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -153,6 +153,9 @@ def locate(name, subdir=None): if subdir: sys.stderr.write(subdir) raise Exception("Can not locate "+name+" in "+base) +def locate_phewas(name, subdir=None): + return locate(name,'/phewas/'+subdir) + def locate_ignore_error(name, subdir=None): """ Locate a static flat file in the GENENETWORK_FILES environment. @@ -217,6 +220,7 @@ USE_REDIS = get_setting_bool('USE_REDIS') USE_GN_SERVER = get_setting_bool('USE_GN_SERVER') GENENETWORK_FILES = get_setting('GENENETWORK_FILES') +PHEWAS_FILES = get_setting('GENENETWORK_FILES')+"/phewas" # TEMP_TRAITS = get_setting('TEMP_TRAITS') PYLMM_COMMAND = pylmm_command() @@ -242,7 +246,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_file(PHEWAS_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") -- cgit v1.2.3