diff options
-rw-r--r-- | wqflask/wqflask/marker_regression/marker_regression_gn1.py | 11 | ||||
-rw-r--r-- | 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 @@ <br> <span style="white-space: nowrap;">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.</span> {% endif %} - {% if permChecked|upper == "ON" %} + {% if nperm > 0 %} <br><br> <img src="/static/output/{{ perm_filename }}.gif"> {% endif %} |