diff options
author | zsloan | 2016-04-07 18:16:50 +0000 |
---|---|---|
committer | zsloan | 2016-04-07 18:16:50 +0000 |
commit | 738326ffa7b8fedc765e0a8b3fc80cc9acea6891 (patch) | |
tree | 18e221a1c1e2c0fa616677efa4766f49f9f8a77d /wqflask | |
parent | 8d7f923631cc3578aa9fb8116b31dbfd773e3b59 (diff) | |
download | genenetwork2-738326ffa7b8fedc765e0a8b3fc80cc9acea6891.tar.gz |
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
Diffstat (limited to 'wqflask')
-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 %} |