aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Sloan2013-02-13 15:24:57 -0600
committerZachary Sloan2013-02-13 15:24:57 -0600
commit7188d8e3fb54901a36abffa72f5bb63eed530b9c (patch)
tree90f226b8f0320fc2ae27cd41c4e60119b8add3c3
parente416b7b4fcabff05d1665ae5dbb962cfb61e471d (diff)
downloadgenenetwork2-7188d8e3fb54901a36abffa72f5bb63eed530b9c.tar.gz
Got results for marker regression page displaying in table
-rwxr-xr-xwqflask/wqflask/marker_regression/marker_regression.py18
-rw-r--r--wqflask/wqflask/templates/marker_regression.html25
2 files changed, 37 insertions, 6 deletions
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index c9451154..c06ab7e8 100755
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -308,7 +308,7 @@ class MarkerRegression(object):
self.js_data = dict(
qtl_results = self.pure_qtl_results,
- lrs_array = self.lrs_array,
+ lrs_values = self.lrs_values,
)
@@ -504,12 +504,20 @@ class MarkerRegression(object):
self.lrs_values = [marker['lrs_value'] for marker in self.dataset.group.markers.markers]
print("self.lrs_values is:", pf(self.lrs_values))
+ lrs_values_sorted = sorted(self.lrs_values)
+
+ print("lrs_values_sorted is:", pf(lrs_values_sorted))
print("int(self.num_perm*0.37-1)", pf(int(self.num_perm*0.37-1)))
-
+
+ lrs_values_length = len(lrs_values_sorted)
+
+ def lrs_threshold(place):
+ return lrs_values_sorted[int((lrs_values_length * place) -1)]
+
self.lrs_thresholds = Bunch(
- suggestive = self.lrs_values[int(self.num_perm*0.37-1)],
- significant = self.lrs_values[int(self.num_perm*0.95-1)],
- highly_significant = self.lrs_values[int(self.num_perm*0.99-1)]
+ suggestive = lrs_threshold(.37),
+ significant = lrs_threshold(.95),
+ highly_significant = lrs_threshold(.99),
)
#self.lrs_thresholds = Bunch(
diff --git a/wqflask/wqflask/templates/marker_regression.html b/wqflask/wqflask/templates/marker_regression.html
index aeb05132..b5477070 100644
--- a/wqflask/wqflask/templates/marker_regression.html
+++ b/wqflask/wqflask/templates/marker_regression.html
@@ -18,9 +18,32 @@
<div class="container">
<div id="manhattan_plots" class="manhattan_plots"></div>
<div id="permutation_histogram" class="permutation_histogram"></div>
+
+ <table class="table table-hover table-striped table-bordered">
+ <thead>
+ <tr>
+ <td>Index</td>
+ <td>LRS</td>
+ <td>Chr</td>
+ <td>Mb</td>
+ <td>Locus</td>
+ </tr>
+ </thead>
+ <tbody>
+ {% for marker in filtered_results %}
+ <tr>
+ <td>{{loop.index}}</td>
+ <td>{{marker.lrs_value}}</td>
+ <td>{{marker.chr}}</td>
+ <td>{{marker.Mb}}</td>
+ <td>{{marker.name}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
</div>
-
<!-- End of body -->
{% endblock %}