aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/webqtlConfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/webqtlConfig.py')
-rw-r--r--wqflask/base/webqtlConfig.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index 6bbabdec..e5f10edf 100644
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -8,7 +8,7 @@
#
#########################################
-from utility.tools import valid_path, mk_dir, assert_dir, flat_files, TEMPDIR
+from utility.tools import valid_path, mk_dir, assert_dir, assert_writable_dir, flat_files, TEMPDIR
#Debug Level
#1 for debug, mod python will reload import each time
@@ -60,24 +60,36 @@ ENSEMBLETRANSCRIPT_URL="http://useast.ensembl.org/Mus_musculus/Lucene/Details?sp
# HTMLPATH is replaced by GENODIR
# IMGDIR is replaced by GENERATED_IMAGE_DIR
-# Temporary storage (note that this TMPDIR is not the same directory
-# as the UNIX TMPDIR)
+# Temporary storage (note that this TMPDIR can be set as an
+# environment variable - use utility.tools.TEMPDIR when you
+# want to reach this base dir
+assert_writable_dir(TEMPDIR)
+
TMPDIR = mk_dir(TEMPDIR+'/gn2/')
+assert_writable_dir(TMPDIR)
+
CACHEDIR = mk_dir(TMPDIR+'/cache/')
# We can no longer write into the git tree:
GENERATED_IMAGE_DIR = mk_dir(TMPDIR+'/generated/')
GENERATED_TEXT_DIR = mk_dir(TMPDIR+'/generated_text/')
+# Make sure we have permissions to access these
+assert_writable_dir(CACHEDIR)
+assert_writable_dir(GENERATED_IMAGE_DIR)
+assert_writable_dir(GENERATED_TEXT_DIR)
+
# Flat file directories
GENODIR = flat_files('genotype')+'/'
+assert_dir(GENODIR)
+
+# JSON genotypes are OBSOLETE
JSON_GENODIR = flat_files('genotype/json')+'/'
if not valid_path(JSON_GENODIR):
# fall back on old location (move the dir, FIXME)
JSON_GENODIR = flat_files('json')
-assert_dir(GENODIR)
+# Are we using the following...?
PORTADDR = "http://50.16.251.170"
-
INFOPAGEHREF = '/dbdoc/%s.html'
CGIDIR = '/webqtl/' #XZ: The variable name 'CGIDIR' should be changed to 'PYTHONDIR'
SCRIPTFILE = 'main.py'