aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility/tools.py')
-rw-r--r--wqflask/utility/tools.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 6e35f00a..760ded7c 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -66,4 +66,19 @@ def plink_command(default=None):
guess = os.environ.get('HOME')+'/plink'
path = get_setting('PLINK_PATH',default,guess,get_valid_path)
plink_command = path+'/plink'
- return path,plink_command \ No newline at end of file
+ return path,plink_command
+
+def gemma_command(default=None):
+ def get_valid_path(path):
+ """Test for a valid repository"""
+ if path:
+ sys.stderr.write("Trying PLINK_PATH in "+path+"\n")
+ if path and os.path.isfile(path+'/plink'):
+ return path
+ else:
+ None
+
+ guess = os.environ.get('HOME')+'/plink'
+ path = get_setting('PLINK_PATH',default,guess,get_valid_path)
+ gemma_command = path+'/gemma'
+ return path, gemma_command \ No newline at end of file