diff options
author | Pjotr Prins | 2017-03-07 10:02:12 +0000 |
---|---|---|
committer | Pjotr Prins | 2017-03-07 10:02:12 +0000 |
commit | 9f809adc0a03604ae47cc05e0ff51229e2827ed6 (patch) | |
tree | fdc853c5869b1bbda5444d367f0d7198ba7006cd /wqflask/utility | |
parent | af590c4b3f63b21cb7ddd72d256acc190b6905bb (diff) | |
download | genenetwork2-9f809adc0a03604ae47cc05e0ff51229e2827ed6.tar.gz |
- Use locate_phewas for phewas filesphewas
- Use logger instead of print statements
Diffstat (limited to 'wqflask/utility')
-rw-r--r-- | wqflask/utility/tools.py | 6 |
1 files changed, 5 insertions, 1 deletions
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") |