From baff5eb1e890a4a8b33fb1917a1c17d3b1737959 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 26 Jun 2015 18:29:49 +0000 Subject: 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. --- wqflask/utility/tools.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'wqflask/utility/tools.py') 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 -- cgit v1.2.3