From 738326ffa7b8fedc765e0a8b3fc80cc9acea6891 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 7 Apr 2016 18:16:50 +0000
Subject: Permutation figure and x-axis label should change to correctly
reflect the mapping scale (lrs or lod)
Fixed bug where broken image link would appear if you ran R/qtl with no permutations
---
wqflask/wqflask/marker_regression/marker_regression_gn1.py | 11 +++++++++--
wqflask/wqflask/templates/marker_regression_gn1.html | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
index 3e08f7ae..ec4f79aa 100644
--- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py
+++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
@@ -2541,12 +2541,19 @@ class MarkerRegression(object):
heading2.append(HT.Strong("Trait Name: "), fd.identification)
return HT.TD(intMapHeading, heading2, valign="top")
- def drawPermutationHistogram(self, x_label='LRS'):
+ def drawPermutationHistogram(self):
#########################################
# Permutation Graph
#########################################
myCanvas = pid.PILCanvas(size=(400,300))
- Plot.plotBar(myCanvas, self.perm_output, XLabel='LRS', YLabel='Frequency', title=' Histogram of Permutation Test')
+ if 'lod_score' in self.qtlresults[0] and self.LRS_LOD == "LRS":
+ perm_output = [value*4.16 for value in self.perm_output]
+ elif 'lod_score' not in self.qtlresults[0] and self.LRS_LOD == "LOD":
+ perm_output = [value/4.16 for value in self.perm_output]
+ else:
+ perm_output = self.perm_output
+
+ Plot.plotBar(myCanvas, perm_output, XLabel=self.LRS_LOD, YLabel='Frequency', title=' Histogram of Permutation Test')
filename= webqtlUtil.genRandStr("Reg_")
myCanvas.save(webqtlConfig.IMGDIR+filename, format='gif')
diff --git a/wqflask/wqflask/templates/marker_regression_gn1.html b/wqflask/wqflask/templates/marker_regression_gn1.html
index cc881011..67f5e010 100644
--- a/wqflask/wqflask/templates/marker_regression_gn1.html
+++ b/wqflask/wqflask/templates/marker_regression_gn1.html
@@ -139,7 +139,7 @@
A positive additive coefficient (green line) indicates that {{ dataset.group.parlist[1] }} alleles increase trait values. In contrast, a negative additive coefficient (orange line) indicates that {{ dataset.group.parlist[0] }} alleles increase trait values.
{% endif %}
- {% if permChecked|upper == "ON" %}
+ {% if nperm > 0 %}
{% endif %}
--
cgit v1.2.3