aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-09-22 16:44:03 -0500
committerzsloan2020-09-22 16:44:03 -0500
commit3687a5882ea94385d49b7bc91b01d5c9025ea40f (patch)
tree497751a15d469edb451183263700ed3197f538a8 /wqflask
parentde3ffeea12ad38222eab3e1f4a179b67025fffd0 (diff)
downloadgenenetwork2-3687a5882ea94385d49b7bc91b01d5c9025ea40f.tar.gz
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
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/marker_regression/run_mapping.py4
-rw-r--r--wqflask/wqflask/templates/mapping_results.html11
2 files changed, 7 insertions, 8 deletions
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 @@
<button class="btn btn-success" id="add" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
<br />
<br />
- <div id="table_container" style="width:{% if 'additive' in trimmed_markers[0] %}500{% else %}470{% endif %}px;">
+ <div id="table_container" style="width:{% if 'additive' in trimmed_markers[0] %}600{% else %}550{% endif %}px;">
<table id="trait_table" class="table-hover table-striped cell-border dataTable no-footer">
<thead>
<tr>
<th></th>
<th>Row</th>
<th>Marker</th>
- {% LRS_LOD == "-log(p)" %}
+ {% if LRS_LOD == "-log(p)" %}
<th>–log(p)</th>
{% else %}
<th>{{ LRS_LOD }}</th>
{% endif %}
- <th>Position</th>
+ <th>Position ({% if plotScale == "physic" %}Mb{% else %}cM{% endif %})</th>
{% if 'additive' in trimmed_markers[0] %}
<th>Add Eff</th>
{% endif %}
@@ -272,7 +272,7 @@
<td align="right">{{ '%0.2f' | format(marker.lrs_value|float) }}</td>
{% endif %}
{% endif %}
- <td align="right">{{ marker.display_pos }}/td>
+ <td align="right">{{ marker.display_pos }}</td>
{% if 'additive' in marker %}
<td align="right">{{ '%0.3f' | format(marker.additive|float) }}</td>
{% 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" %},