diff options
author | Frederick Muriuki Muriithi | 2021-12-18 08:11:37 +0300 |
---|---|---|
committer | zsloan | 2022-01-29 00:42:44 -0600 |
commit | 37c668eb1c3d9ad06f8caaf78ac77b69515b6956 (patch) | |
tree | 04045684c14b5d12e887c899df31408a469d9d2a | |
parent | 5027abd962dfc599a9885d12a556fd12c37cadfa (diff) | |
download | genenetwork2-37c668eb1c3d9ad06f8caaf78ac77b69515b6956.tar.gz |
Add templates for the results tables
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* Add templates for the tables that will display the results.
-rw-r--r-- | wqflask/wqflask/static/new/javascript/partial_correlations.js | 1 | ||||
-rw-r--r-- | wqflask/wqflask/templates/partial_correlations.html | 121 |
2 files changed, 122 insertions, 0 deletions
diff --git a/wqflask/wqflask/static/new/javascript/partial_correlations.js b/wqflask/wqflask/static/new/javascript/partial_correlations.js index 71fac21d..b1b12ee7 100644 --- a/wqflask/wqflask/static/new/javascript/partial_correlations.js +++ b/wqflask/wqflask/static/new/javascript/partial_correlations.js @@ -66,6 +66,7 @@ function display_partial_corr_results(data, status, xhr) { child = document.createElement("p"); child.textContent = data; parent.appendChild(child); + console.log(data); } function display_partial_corr_error(xhr, status, error) { diff --git a/wqflask/wqflask/templates/partial_correlations.html b/wqflask/wqflask/templates/partial_correlations.html index 08d6fc2a..215ba32e 100644 --- a/wqflask/wqflask/templates/partial_correlations.html +++ b/wqflask/wqflask/templates/partial_correlations.html @@ -222,6 +222,127 @@ <img src="/static/gif/waitAnima2.gif"> </span> <div id="part-corr-success"> + <table id="part-corr-results-publish" style="display:none;"> + <thead> + <tr> + <th>_</th> + <th>Record</th> + <th>Phenotype</th> + <th>Authors</th> + <th>Year</th> + <th>N</th> + <th>Partial {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>p(partial {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%})</th> + <th>{%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>p({%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%})</th> + <th>delta {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + </tr> + </thead> + + <tbody> + <tr class="template-publish-results-row"> + <td data-column-heading="_"></td> + <td data-column-heading="Record"></td> + <td data-column-heading="Phenotype"></td> + <td data-column-heading="Authors"></td> + <td data-column-heading="Year"></td> + <td data-column-heading="N"></td> + <td data-column-heading="Partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"> + </td> + <td data-column-heading="p(partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})"> + </td> + <td data-column-heading="{%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"> + </td> + <td data-column-heading="p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})"> + </td> + <td data-column-heading="delta {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"> + </td> + </tr> + </tbody> + </table> + + <table id="part-corr-results-geno" style="display:none;"> + <thead> + <tr> + <th>_</th> + <th>Chr</th> + <th>Megabase</th> + <th>N</th> + <th>Partial {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>p(partial {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%})</th> + <th>{%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>p({%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%})</th> + <th>delta {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + </tr> + </thead> + + <tbody> + <tr class="template-geno-results-row"> + <td data-column-heading="_"></td> + <td data-column-heading="Chr"></td> + <td data-column-heading="Megabase"></td> + <td data-column-heading="N"></td> + <td data-column-heading="Partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"> + </td> + <td data-column-heading="p(partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})"> + </td> + <td data-column-heading="{%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"> + </td> + <td data-column-heading="p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})"> + </td> + <td data-column-heading="delta {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"> + </td> + </tr> + </tbody> + </table> + + <table id="part-corr-results-probeset" style="display:none;"> + <thead> + <tr> + <th>_</th> + <th>Record</th> + <th>Gene ID</th> + <th>Homologene ID</th> + <th>Symbol</th> + <th>Description</th> + <th>Chr</th> + <th>Megabase</th> + <th>Mean Expr</th> + <th>N</th> + <th>Sample Partial {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>Sample p(partial {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%})</th> + <th>Sample {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>Sample p({%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%})</th> + <th>delta {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>Lit Corr</th> + <th>Tissue {%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%}</th> + <th>Tissue p({%if "spearman" in (method | lower):%}rho{%else:%}r{%endif%})</th> + </tr> + </thead> + + <tbody> + <tr class="template-probeset-results-row"> + <td data-column-heading="_"></td> + <td data-column-heading="Record"></td> + <td data-column-heading="Gene ID"></td> + <td data-column-heading="Homologene ID"></td> + <td data-column-heading="Symbol"></td> + <td data-column-heading="Description"></td> + <td data-column-heading="Chr"></td> + <td data-column-heading="Megabase"></td> + <td data-column-heading="Mean Expr"></td> + <td data-column-heading="N"></td> + <td data-column-heading="Sample Partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"></td> + <td data-column-heading="Sample p(partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})"></td> + <td data-column-heading="Sample {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"></td> + <td data-column-heading="Sample p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})"></td> + <td data-column-heading="delta {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"></td> + <td data-column-heading="Lit Corr"></td> + <td data-column-heading="Tissue {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}"></td> + <td data-column-heading="Tissue p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})"></td> + </tr> + </tbody> + </table> </div> <div id="part-corr-error"> </div> |