aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2015-04-19 18:57:56 +0200
committerPjotr Prins2015-04-19 18:57:56 +0200
commit561ad00c82f440aefd5dbaf741d927cb63a37e0f (patch)
tree745e4a1798f96c23e22b17f66f77d4004b7f0709
parent1b71fc64719ba5c5b56d23aad9d9dc45bc2898a9 (diff)
downloadgenenetwork2-561ad00c82f440aefd5dbaf741d927cb63a37e0f.tar.gz
Pick up PYLMM_PATH from environment or setting.py
-rwxr-xr-xwqflask/wqflask/marker_regression/marker_regression.py10
-rwxr-xr-xwqflask/wqflask/model.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index fba34b99..8d3eba48 100755
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -25,6 +25,7 @@ from redis import Redis
Redis = Redis()
from flask import Flask, g
+from wqflask import app
from base.trait import GeneralTrait
from base import data_set
@@ -40,7 +41,14 @@ from utility import temp_data
from utility.benchmark import Bench
-PYLMM_COMMAND= 'python /home/pjotr/izip/git/opensource/python/gn2/wqflask/wqflask/my_pylmm/pyLMM/lmm.py'
+import os
+if os.environ['PYLMM_PATH'] is None:
+ PYLMM_PATH=app.config['PYLMM_PATH']
+ if PYLMM_PATH is None:
+ PYLMM_PATH=os.environ['HOME']+'/gene/wqflask/wqflask/my_pylmm/pyLMM'
+if !os.path.isfile(PYLMM_PATH+'lmm.py'):
+ raise 'PYLMM_PATH unknown or faulty'
+PYLMM_COMMAND= 'python '+PYLMM_PATH+'/lmm.py'
class MarkerRegression(object):
diff --git a/wqflask/wqflask/model.py b/wqflask/wqflask/model.py
index fa8c1aab..042cb8df 100755
--- a/wqflask/wqflask/model.py
+++ b/wqflask/wqflask/model.py
@@ -194,4 +194,4 @@ def display_collapsible(number):
def user_uuid():
"""Unique cookie for a user"""
user_uuid = request.cookies.get('user_uuid')
- \ No newline at end of file
+