aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility
diff options
context:
space:
mode:
authorzsloan2015-06-26 18:29:49 +0000
committerzsloan2015-06-26 18:29:49 +0000
commitbaff5eb1e890a4a8b33fb1917a1c17d3b1737959 (patch)
treed20bcde39537a75dde7b696f43a925f459f23985 /wqflask/utility
parentd9b6def148fae5331929b6d0427804e675a8a594 (diff)
downloadgenenetwork2-baff5eb1e890a4a8b33fb1917a1c17d3b1737959.tar.gz
Fixed bug where mapping results sometimes wouldn't display. This would occur
due to a chromosome (in this case the last) not having any markers. Improved the way plink gets its path/command to use a method similar to the one Pjotr used with pylmm. I'll also do this for the other mapping methods. Fixed issue where the Y axis would always say LOD score. It now says LRS for mapping methods that return LRS Switched interval mapping (qtl reaper) to use the marker_regression template and removed the interval_mapping template (since it's unnecessary) Some commented out changes remain (in show_trait_mapping_tools and create_lodchart) from when I was attempting to open the mapping results in a new page. I had resolved every issue but the mapping javascript (lod_chart) not being able to access js_data (which has all the result data; markers, p-values, etc). I'm pretty sure that this is because js_data was inserted into the html after the page was loaded while the chart code ran immediately. I experimented with adding a short timeout to the mapping javascript and data table javascript, but while it worked for the table it did not work for the mapping figure. I don't know why this is.
Diffstat (limited to 'wqflask/utility')
-rw-r--r--wqflask/utility/tools.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 1a5c19d9..6e35f00a 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -49,3 +49,21 @@ def pylmm_command(default=None):
path = get_setting('PYLMM_PATH',default,guess,get_valid_path)
pylmm_command = 'python '+path+'/pylmm_gn2/lmm.py'
return path,pylmm_command
+
+def plink_command(default=None):
+ """
+ Return the path to the repository and the python command to call
+ """
+ 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)
+ plink_command = path+'/plink'
+ return path,plink_command \ No newline at end of file