aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2021-05-01 01:14:30 +0300
committerAlexander Kabui2021-05-01 01:14:30 +0300
commit05acf00467b9338072cde7556dc7b0ca130242c9 (patch)
tree1607d15260839681250525677e3ce10ff92a584f
parent8637c4f0487117c43be629b8bd14e51c48e5fbcf (diff)
downloadgenenetwork2-05acf00467b9338072cde7556dc7b0ca130242c9.tar.gz
add default values for empt columns
-rw-r--r--wqflask/wqflask/templates/test_correlation_page.html21
1 files changed, 15 insertions, 6 deletions
diff --git a/wqflask/wqflask/templates/test_correlation_page.html b/wqflask/wqflask/templates/test_correlation_page.html
index 40d9836c..be9ec226 100644
--- a/wqflask/wqflask/templates/test_correlation_page.html
+++ b/wqflask/wqflask/templates/test_correlation_page.html
@@ -45,6 +45,7 @@
<h3>Correlation Results for <span>Dataset_name</span> against <span><a href="">trait_name</a></span> for the top <span>all</span> Results</h3>
</div>
<div class="header-toggle-vis">
+ <h4 style="font-weight: bolder;padding: 5px 3px;">Toggle Columns</h4>
<button class="toggle-vis" data-column="1">Index</button>
<button class="toggle-vis" data-column="2">Trait Name</button>
<button class="toggle-vis" data-column="3">Sample r</button>
@@ -60,6 +61,8 @@
<th>Sample r</th>
<th>Sample p(r)</th>
<th>N</th>
+ <th>Tissue rho</th>
+ <th>Lit rho</th>
</tr>
</thead>
</table>
@@ -85,8 +88,10 @@
// document.querySelector(".content").innerHTML =correlationResults
// parse the data
let counter = 0;
+ let corr_type = "tissue";
correlationResults =correlationResults.map((trait_object)=>{
let trait_name = Object.keys(trait_object)[0]
+
let new_dict = {
"index":counter,
"trait_name":trait_name,
@@ -94,7 +99,9 @@
}
counter++;
return new_dict;
- })
+ })
+
+console.log(correlationResults)
</script>
@@ -102,13 +109,15 @@
$(document).ready(function() {
let table = $('#example').DataTable( {
"data": correlationResults,
- "columns": [
- {"data":null,"width":"25px"},
+ "columns": [
+ {"data":corr_type=="sample"?null:"fd","width":"25px"},
{ "data": "index","width":"120px","title":"Index" },
{ "data": "trait_name","title":"TraitName"},
- { "data": "corr_coeffient"},
- { "data": "p_value"},
- { "data": "num_overlap"}
+ { "data": "corr_coeffient","defaultContent": "--"},
+ { "data": "p_value","defaultContent":"--"},
+ { "data": "num_overlap","defaultContent":"--"},
+ {"data":"tissue_corr","defaultContent":"--","title":"Tissue rho"},
+ {"data":"lit_corr","defaultContent":"--","title":"Lit rho"}
],
"columnDefs": [
{