aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/tools.py14
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression.py5
2 files changed, 15 insertions, 4 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 5d69e699..624df179 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -78,11 +78,23 @@ def flat_files(subdir=None):
return valid_path(base+"/"+subdir)
return valid_path(base)
+def locate(name, subdir=None):
+ base = get_setting("GENENETWORK_FILES")
+ if subdir:
+ base = base+"/"+subdir
+ if valid_path(base):
+ lookfor = base + "/" + name
+ if valid_path(lookfor):
+ return lookfor
+ else:
+ raise IOError("Can not locate "+lookfor)
+ raise IOError("Can not locate "+name)
+
def tempdir():
return valid_path(get_setting("TEMPDIR","/tmp"))
+
# Cached values
-
PYLMM_COMMAND = pylmm_command()
GEMMA_COMMAND = pylmm_command()
PLINK_COMMAND = pylmm_command()
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index a76a5967..36334317 100644
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -41,7 +41,7 @@ from wqflask.marker_regression import gemma_mapping
#from wqflask.marker_regression import plink_mapping
#from wqflask.marker_regression import rqtl_mapping
-from utility.tools import PYLMM_COMMAND, GEMMA_COMMAND, PLINK_COMMAND
+from utility.tools import locate, PYLMM_COMMAND, GEMMA_COMMAND, PLINK_COMMAND
class MarkerRegression(object):
@@ -979,8 +979,7 @@ class MarkerRegression(object):
#def gen_human_results(self, pheno_vector, tempdata):
def gen_human_results(self, pheno_vector, key, temp_uuid):
- file_base = os.path.join(webqtlConfig.PYLMM_PATH, self.dataset.group.name)
- print("file_base:", file_base)
+ file_base = locate(self.dataset.group.name,"mapping")
plink_input = input.plink(file_base, type='b')
input_file_name = os.path.join(webqtlConfig.SNP_PATH, self.dataset.group.name + ".snps.gz")