From 86f80379fd42d938bd9a295c07b7d1dd91fa8e57 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 24 Mar 2016 20:04:25 +0000 Subject: Graph width can now be set in Mapping Results --- wqflask/wqflask/marker_regression/marker_regression.py | 2 ++ wqflask/wqflask/marker_regression/marker_regression_gn1.py | 4 ++-- wqflask/wqflask/templates/marker_regression_gn1.html | 2 +- wqflask/wqflask/views.py | 1 + 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 @@