aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/base/webqtlConfig.py8
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py8
2 files changed, 10 insertions, 6 deletions
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index d0016b33..f6140ac3 100644
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -8,7 +8,7 @@
#
#########################################
-from utility.tools import mk_dir, assert_dir, flat_files, TEMPDIR
+from utility.tools import valid_path, mk_dir, assert_dir, flat_files, TEMPDIR
#Debug Level
#1 for debug, mod python will reload import each time
@@ -69,7 +69,11 @@ GENERATED_TEXT_DIR = mk_dir(TMPDIR+'/generated_text/')
# Flat file directories
GENODIR = flat_files('genotype')+'/'
-JSON_GENODIR = flat_files('json')+'/'
+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)
PORTADDR = "http://50.16.251.170"
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 6d8dd76a..c1ad1c84 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -161,7 +161,7 @@ class CorrelationResults(object):
self.correlation_data = {}
db_filename = self.getFileName(target_db_name = self.target_dataset.name)
- cache_available = db_filename in os.listdir(webqtlConfig.TEXTDIR)
+ cache_available = db_filename in os.listdir(webqtlConfig.GENERATED_TEXT_DIR)
if self.corr_type == "tissue":
self.trait_symbol_dict = self.dataset.retrieve_genes("Symbol")
@@ -179,7 +179,7 @@ class CorrelationResults(object):
elif self.corr_type == "sample":
if self.dataset.type == "ProbeSet" and cache_available:
- dataset_file = open(webqtlConfig.TEXTDIR+db_filename,'r')
+ dataset_file = open(webqtlConfig.GENERATED_TEXT_DIR+db_filename,'r')
#XZ, 01/08/2009: read the first line
line = dataset_file.readline()
@@ -571,7 +571,7 @@ class CorrelationResults(object):
#db_filename = self.getFileName(target_db_name=self.target_db_name)
#
- #cache_available = db_filename in os.listdir(webqtlConfig.TEXTDIR)
+ #cache_available = db_filename in os.listdir(webqtlConfig.GENERATED_TEXT_DIR)
# If the cache file exists, do a cached correlation for probeset data
if self.dataset.type == "ProbeSet":
@@ -1308,7 +1308,7 @@ class CorrelationResults(object):
# return allcorrelations
- datasetFile = open(webqtlConfig.TEXTDIR+db_filename,'r')
+ datasetFile = open(webqtlConfig.GENERATED_TEXT_DIR+db_filename,'r')
print("Invoking parallel computing")
input_line_list = datasetFile.readlines()