From ba40443dc45d95f77d0c75bf296c5cd38badd0d4 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Tue, 5 Apr 2016 17:30:17 +0000
Subject: Fixed issue where haplotype analyst option would appear when using
 genetic(centimorgan) mapping

---
 wqflask/wqflask/marker_regression/marker_regression_gn1.py | 6 +++++-
 wqflask/wqflask/templates/marker_regression_gn1.html       | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

(limited to 'wqflask')

diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
index 19d521a4..739dc569 100644
--- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py
+++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
@@ -215,7 +215,11 @@ class MarkerRegression(object):
         # Options
         #####################################
         #Mapping options
-        self.plotScale = start_vars['mapping_scale']
+        if start_vars['mapping_scale'] != "":
+            self.plotScale = start_vars['mapping_scale']
+        else:
+            self.plotScale = "physic"
+
         #self.plotScale = fd.formdata.getvalue('scale', 'physic')
         #if self.plotScale == 'physic' and not fd.genotype.Mbmap: #ZS: Not sure where "Mbmap" is stored, if at all; should be fine without this though
         #    self.plotScale = 'morgan'
diff --git a/wqflask/wqflask/templates/marker_regression_gn1.html b/wqflask/wqflask/templates/marker_regression_gn1.html
index f50e1ecb..107b1869 100644
--- a/wqflask/wqflask/templates/marker_regression_gn1.html
+++ b/wqflask/wqflask/templates/marker_regression_gn1.html
@@ -73,9 +73,9 @@
                   {% endif %}
                   <input type="checkbox" name="showGenes" class="checkbox" style="display: inline; margin-top: 0px;" {% if geneChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Gene Track </span> <span style="color:red;">*</span><br>
                   <input type="checkbox" name="viewLegend" class="checkbox" style="display: inline; margin-top: 0px;" {% if legendChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Legend </span><br>
-                  {% if mappingScale == "physic" %}
+                  {% if plotScale != "morgan" %}
                   <input type="checkbox" name="haplotypeAnalystCheck" class="checkbox" style="display: inline; margin-top: 0px;" {% if haplotypeAnalystChecked|upper == "ON" %}value="ON" checked{% endif %}> <span style="font-size: 12px;">Haplotype Analyst </span> <span style="color:red;">*</span>
-                  {% endif %} 
+                  {% endif %}
               </div>
           </div>
         </div>
-- 
cgit v1.2.3