aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2016-03-24 20:04:25 +0000
committerzsloan2016-03-24 20:04:25 +0000
commit86f80379fd42d938bd9a295c07b7d1dd91fa8e57 (patch)
tree760713a999b144cb9848207763524fbf22d54df8
parentb216de9759c9413071fedb9cf5cd1aa63dd054c9 (diff)
downloadgenenetwork2-86f80379fd42d938bd9a295c07b7d1dd91fa8e57.tar.gz
Graph width can now be set in Mapping Results
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression.py2
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression_gn1.py4
-rw-r--r--wqflask/wqflask/templates/marker_regression_gn1.html2
-rw-r--r--wqflask/wqflask/views.py1
4 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index fb7efd0f..43c99744 100644
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -92,6 +92,8 @@ class MarkerRegression(object):
self.startMb = start_vars['startMb']
if "endMb" in start_vars:
self.endMb = start_vars['endMb']
+ if "graphWidth" in start_vars:
+ self.graphWidth = start_vars['graphWidth']
if "startMb" in start_vars: #ZS: This is to ensure showGenes is checked the first time you open the mapping page, since startMb will only not be set during the first load
if "showGenes" in start_vars:
self.showGenes = start_vars['showGenes']
diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
index 83b33353..b338d8ea 100644
--- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py
+++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
@@ -260,9 +260,9 @@ class MarkerRegression(object):
#Darwing Options
try:
if self.selectedChr > -1:
- self.graphWidth = min(self.GRAPH_MAX_WIDTH, max(self.GRAPH_MIN_WIDTH, int(fd.formdata.getvalue('graphWidth'))))
+ self.graphWidth = min(self.GRAPH_MAX_WIDTH, max(self.GRAPH_MIN_WIDTH, int(start_vars['graphWidth'])))
else:
- self.graphWidth = min(self.GRAPH_MAX_WIDTH, max(self.MULT_GRAPH_MIN_WIDTH, int(fd.formdata.getvalue('graphWidth'))))
+ self.graphWidth = min(self.GRAPH_MAX_WIDTH, max(self.MULT_GRAPH_MIN_WIDTH, int(start_vars['graphWidth'])))
except:
if self.selectedChr > -1:
self.graphWidth = self.GRAPH_DEFAULT_WIDTH
diff --git a/wqflask/wqflask/templates/marker_regression_gn1.html b/wqflask/wqflask/templates/marker_regression_gn1.html
index 33335615..097cc873 100644
--- a/wqflask/wqflask/templates/marker_regression_gn1.html
+++ b/wqflask/wqflask/templates/marker_regression_gn1.html
@@ -62,7 +62,7 @@
<tr>
<td><b>Width:&nbsp;</b></td>
<td>
- <input type="text" name="graphWidth" value="1600" size="5"><span style="font-size: 11px;"> pixels (minimum=900)</span>
+ <input type="text" name="graphWidth" value="{% if graphWidth is defined %}{{ graphWidth }}{% else %}1600{% endif %}" size="5"><span style="font-size: 11px;"> pixels (minimum=900)</span>
</td>
</tr>
</table>
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 23073f88..d3db044d 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -356,6 +356,7 @@ def marker_regression_page():
'pair_scan',
'startMb',
'endMb',
+ 'graphWidth',
'showGenes',
'mapmethod_rqtl_geno',
'mapmodel_rqtl_geno'