From 3687a5882ea94385d49b7bc91b01d5c9025ea40f Mon Sep 17 00:00:00 2001
From: zsloan
Date: Tue, 22 Sep 2020 16:44:03 -0500
Subject: Fixed a couple mistakes in the previous commit and changed the
position header on the mapping results page to include the mapping scale
* wqflask/wqflask/marker_regression/run_mapping.py - changed how
"display_pos" is defined for marker obs
* wqflask/wqflask/templates/mapping_results.html - Fixed issues with
last commit and changed position header name to include mapping scale
---
wqflask/wqflask/marker_regression/run_mapping.py | 4 ++--
wqflask/wqflask/templates/mapping_results.html | 11 +++++------
2 files changed, 7 insertions(+), 8 deletions(-)
(limited to 'wqflask')
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py
index 8bc91b47..8a44b3fd 100644
--- a/wqflask/wqflask/marker_regression/run_mapping.py
+++ b/wqflask/wqflask/marker_regression/run_mapping.py
@@ -416,9 +416,9 @@ class RunMapping(object):
highest_chr = marker['chr']
if ('lod_score' in marker.keys()) or ('lrs_value' in marker.keys()):
if 'Mb' in marker.keys():
- marker['display_pos'] = str(marker['chr']) + "{.3f}".format(marker['Mb'])
+ marker['display_pos'] = "Chr" + str(marker['chr']) + ": " + "{:.3f}".format(marker['Mb'])
elif 'cM' in marker.keys():
- marker['display_pos'] = str(marker['chr']) + "{.3f}".format(marker['Mb'])
+ marker['display_pos'] = "Chr" + str(marker['chr']) + ": " + "{:.3f}".format(marker['cM'])
else:
marker['display_pos'] = "N/A"
self.qtl_results.append(marker)
diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html
index 657731b1..41d760c0 100644
--- a/wqflask/wqflask/templates/mapping_results.html
+++ b/wqflask/wqflask/templates/mapping_results.html
@@ -228,19 +228,19 @@
-
Row | Marker | - {% LRS_LOD == "-log(p)" %} + {% if LRS_LOD == "-log(p)" %}–log(p) | {% else %}{{ LRS_LOD }} | {% endif %} -Position | +Position ({% if plotScale == "physic" %}Mb{% else %}cM{% endif %}) | {% if 'additive' in trimmed_markers[0] %}Add Eff | {% endif %} @@ -272,7 +272,7 @@{{ '%0.2f' | format(marker.lrs_value|float) }} | {% endif %} {% endif %} -{{ marker.display_pos }}/td> + | {{ marker.display_pos }} | {% if 'additive' in marker %}{{ '%0.3f' | format(marker.additive|float) }} | {% endif %} @@ -352,8 +352,7 @@ "columns": [ { "type": "natural", "width": "5%" }, { "type": "natural", "width": "8%" }, - { "type": "natural", "width": "25%" }, - { "type": "natural" }, + { "type": "natural", "width": "20%" }, { "type": "natural" }, { "type": "natural" }{% if 'additive' in qtlresults[0] %}, { "type": "natural" }{% endif %}{% if 'dominance' in qtlresults[0] and dataset.group.genetic_type != "riset" %}, -- cgit v1.2.3
---|