aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/partial_correlations
diff options
context:
space:
mode:
authorArun Isaac2023-12-29 18:55:37 +0000
committerArun Isaac2023-12-29 19:01:46 +0000
commit204a308be0f741726b9a620d88fbc22b22124c81 (patch)
treeb3cf66906674020b530c844c2bb4982c8a0e2d39 /gn2/wqflask/templates/partial_correlations
parent83062c75442160427b50420161bfcae2c5c34c84 (diff)
downloadgenenetwork2-204a308be0f741726b9a620d88fbc22b22124c81.tar.gz
Namespace all modules under gn2.
We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service.
Diffstat (limited to 'gn2/wqflask/templates/partial_correlations')
-rw-r--r--gn2/wqflask/templates/partial_correlations/pcorrs_error.html65
-rw-r--r--gn2/wqflask/templates/partial_correlations/pcorrs_poll_results.html19
-rw-r--r--gn2/wqflask/templates/partial_correlations/pcorrs_results_presentation.html261
-rw-r--r--gn2/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html115
-rw-r--r--gn2/wqflask/templates/partial_correlations/pcorrs_select_operations.html167
5 files changed, 627 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/partial_correlations/pcorrs_error.html b/gn2/wqflask/templates/partial_correlations/pcorrs_error.html
new file mode 100644
index 00000000..8d6c4bbe
--- /dev/null
+++ b/gn2/wqflask/templates/partial_correlations/pcorrs_error.html
@@ -0,0 +1,65 @@
+{% extends "base.html" %}
+{% block title %}Error: {{message}}{% endblock %}
+{% block content %}
+<!-- Start of body -->
+
+<div class="container">
+ <div class="col-md-8">
+ <div class="form-group has-error">
+ <div class="control-label" for="inputError1">
+
+ <img src="/static/gif/error/{{ error_image }}">
+
+ <h1>ERROR</h1>
+
+ <p>
+ This error is not what we wanted to see. Unfortunately errors
+ are part of all software systems and we need to resolve this
+ together.
+ </p>
+ <p>
+ <b>It is important to report this ERROR so we can fix it for everyone</b>.
+ </p>
+
+ <p>
+ Report to the GeneNetwork team by recording the steps you take
+ to reproduce this ERROR. Next to those steps, copy-paste below
+ stack trace, either as
+ a <a href="https://github.com/genenetwork/genenetwork2/issues/new">new
+ issue</a> or E-mail this full page to one of the developers
+ directly.
+ </p>
+ </div>
+
+ <p>
+ GeneNetwork error:<br />
+ {{message}}
+ </p>
+
+ {%if command_id %}
+ <p>
+ Please provide the following information to help with
+ troubleshooting:<br />
+ <strong>Command ID</strong>: <em>{{command_id}}</em>
+ </p>
+ {%endif%}
+
+ <p>
+ To check if this already a known issue, search the
+ <a href="https://github.com/genenetwork/genenetwork2/issues">issue
+ tracker</a>.
+ </p>
+
+ <a href="#Stack" class="btn btn-default" data-toggle="collapse">Toggle full stack trace</a>
+ <div id="Stack" class="collapse">
+ <pre>
+ GeneNetwork {{ version }} {% for line in stack %} {{ line }}
+ {% endfor %}
+ </pre>
+ </div>
+ </div>
+ </div>
+</div>
+
+
+{% endblock %}
diff --git a/gn2/wqflask/templates/partial_correlations/pcorrs_poll_results.html b/gn2/wqflask/templates/partial_correlations/pcorrs_poll_results.html
new file mode 100644
index 00000000..38577c32
--- /dev/null
+++ b/gn2/wqflask/templates/partial_correlations/pcorrs_poll_results.html
@@ -0,0 +1,19 @@
+{%extends "base.html"%}
+
+{%block title%}Partial Correlations:{%endblock%}
+
+{%block css%}
+<meta http-equiv="refresh"
+ content="5;URL=/partial_correlations/{{command_id}}">
+{%endblock%}
+
+{%block content%}
+
+<div class="container">
+ <center>
+ <h1>Computing partial correlations...</h1>
+ <img src="/static/gif/waitAnima2.gif"
+ alt="Image indicating computation of partial correlations is ongoing" />
+ </center>
+</div>
+{%endblock%}
diff --git a/gn2/wqflask/templates/partial_correlations/pcorrs_results_presentation.html b/gn2/wqflask/templates/partial_correlations/pcorrs_results_presentation.html
new file mode 100644
index 00000000..dac02397
--- /dev/null
+++ b/gn2/wqflask/templates/partial_correlations/pcorrs_results_presentation.html
@@ -0,0 +1,261 @@
+{%extends "base.html"%}
+
+{%block title%}Partial Correlations:{%endblock%}
+
+{%block css%}
+<link rel="stylesheet" type="text/css" href="/static/new/css/partial_correlations.css" />
+<link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" />
+<link rel="stylesheet" type="text/css" href="/static/new/css/trait_list.css" />
+<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
+{%endblock%}
+
+{%block content%}
+<div class="container">
+ <p>
+ <strong>Primary Trait</strong><br /><br />
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=primary['trait_name'],
+ dataset=primary['dataset_name'])}}"
+ title="Link to trait data for trait {{primary['trait_name']}}">
+ {{primary["dataset_type"]}}/{{primary["trait_name"]}}
+ [{{primary["symbol"] }} on Chr {{primary["chr"]}} @ {{primary["mb"]}}]:
+ {{primary["description"]}}
+ </a> --- FROM: {{primary["dataset_name"]}}
+ </p>
+ <p><strong>Control Traits</strong><br /><br />
+ {%for trait in controls:%}
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=trait['trait_name'],
+ dataset=trait['dataset_name'])}}"
+ title="Link to trait data for trait {{trait['trait_name']}}">
+ {{trait["dataset_type"]}}/{{trait["trait_name"]}}
+ [{{trait["symbol"] }} on Chr {{trait["chr"]}} @ {{trait["mb"]}}]:
+ {{trait["description"]}}
+ </a> --- FROM: {{trait["dataset_name"]}}<br />
+ {%endfor%}
+ </p>
+
+ <div id="partial-correlation-results">
+ {%if dataset_type == "Publish":%}
+ <table id="part-corr-results-publish"
+ class="table-hover table-striped cell-border dataTable"
+ style="float: left;">
+ <thead>
+ <tr>
+ <th>
+ </th>
+ <th>Index</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>
+ {%for idx, trait in enumerate(correlations, start=1):%}
+ <tr class="results-row">
+ <td>
+ <input type="checkbox" name="chk_{{trait['trait_name']}}"
+ value="{{trait['trait_fullname']}}" />
+ </td>
+ <td data-column-heading="Index">{{idx}}</td>
+ <td data-column-heading="Record">
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=trait['trait_name'],
+ dataset=trait['dataset_name'])}}"
+ title="Link to trait data for trait {{trait['trait_name']}}">
+ {{trait["trait_name"]}}
+ </a>
+ </td>
+ <td data-column-heading="Phenotype">
+ {{trait["post_publication_description"]}}</td>
+ <td data-column-heading="Authors">{{trait["authors"]}}</td>
+ <td data-column-heading="Year">{{trait["year"]}}</td>
+ <td data-column-heading="N">{{trait["noverlap"]}}</td>
+ <td data-column-heading="Partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("partial_corr"))}}
+ </td>
+ <td data-column-heading="p(partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})">
+ {{format_number(trait.get("partial_corr_p_value"))}}
+ </td>
+ <td data-column-heading="{%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("corr"))}}
+ </td>
+ <td data-column-heading="p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})">
+ {{format_number(trait.get("corr_p_value"))}}
+ </td>
+ <td data-column-heading="delta {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("delta"))}}
+ </td>
+ </tr>
+ {%endfor%}
+ </tbody>
+ </table>
+ {%endif%}
+
+ {%if dataset_type == "Geno":%}
+ <table id="part-corr-results-geno"
+ class="table-hover table-striped cell-border dataTable"
+ style="float: left;">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Index</th>
+ <th>Locus</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>
+ {%for idx, trait in enumerate(correlations, start=1):%}
+ <tr class="results-row">
+ <td>
+ <input type="checkbox" name="chk_{{trait['trait_name']}}"
+ value="{{trait['trait_fullname']}}" />
+ </td>
+ <td data-column-heading="Index">{{idx}}</td>
+ <td data-column-heading="Locus">
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=trait['trait_name'],
+ dataset=trait['dataset_name'])}}"
+ title="Link to trait data for trait {{trait['trait_name']}}">
+ {{trait["trait_name"]}}
+ </a>
+ </td>
+ <td data-column-heading="Chr">{{trait["chr"]}}</td>
+ <td data-column-heading="Megabase">{{trait["mb"]}}</td>
+ <td data-column-heading="N">{{trait["noverlap"]}}</td>
+ <td data-column-heading="Partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("partial_corr"))}}
+ </td>
+ <td data-column-heading="p(partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})">
+ {{format_number(trait.get("partial_corr_p_value"))}}
+ </td>
+ <td data-column-heading="{%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("corr"))}}
+ </td>
+ <td data-column-heading="p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})">
+ {{format_number(trait.get("corr_p_value"))}}
+ </td>
+ <td data-column-heading="delta {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("delta"))}}
+ </td>
+ </tr>
+ {%endfor%}
+ </tbody>
+ </table>
+ {%endif%}
+
+ {%if dataset_type == "ProbeSet":%}
+ <table id="part-corr-results-probeset"
+ class="table-hover table-striped cell-border dataTable"
+ style="float: left;">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Index</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>
+ {%for idx, trait in enumerate(correlations, start=1):%}
+ <tr class="results-row">
+ <td>
+ <input type="checkbox" name="chk_{{trait['trait_name']}}"
+ value="{{trait['trait_fullname']}}" />
+ </td>
+ <td data-column-heading="Index">{{idx}}</td>
+ <td data-column-heading="Record">
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=trait['trait_name'],
+ dataset=trait['dataset_name'])}}"
+ title="Link to trait data for trait {{trait['trait_name']}}">
+ {{trait["trait_name"]}}
+ </a>
+ </td>
+ <td data-column-heading="Gene ID">{{trait["geneid"]}}</td>
+ <td data-column-heading="Homologene ID">{{trait["homologeneid"]}}</td>
+ <td data-column-heading="Symbol">{{trait["symbol"]}}</td>
+ <td data-column-heading="Description">{{trait["description"]}}</td>
+ <td data-column-heading="Chr">{{trait["chr"]}}</td>
+ <td data-column-heading="Megabase">{{trait["mb"]}}</td>
+ <td data-column-heading="Mean Expr">{{trait["mean_expr"]}}</td>
+ <td data-column-heading="N">{{trait["noverlap"]}}</td>
+ <td data-column-heading="Sample Partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("partial_corr"))}}
+ </td>
+ <td data-column-heading="Sample p(partial {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})">
+ {{format_number(trait.get("partial_corr_p_value"))}}
+ </td>
+ <td data-column-heading="Sample {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("corr"))}}
+ </td>
+ <td data-column-heading="Sample p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})">
+ {{format_number(trait.get("corr_p_value"))}}
+ </td>
+ <td data-column-heading="delta {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("delta"))}}
+ </td>
+ <td data-column-heading="Lit Corr">
+ {{format_number(trait.get("l_corr"))}}
+ </td>
+ <td data-column-heading="Tissue {%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%}">
+ {{format_number(trait.get("tissue_corr"))}}
+ </td>
+ <td data-column-heading="Tissue p({%if 'spearman' in (method | lower):%}rho{%else:%}r{%endif%})">
+ {{format_number(trait.get("tissue_p_value"))}}
+ </td>
+ </tr>
+ {%endfor%}
+ </tbody>
+ </table>
+ {%endif%}
+
+ </div>
+</div>
+{%endblock%}
+
+{%block js%}
+{%if step == "select-corr-method":%}
+<script type="text/javascript"
+ src="/static/new/javascript/partial_correlations.js"></script>
+<script language="javascript" type="text/javascript"
+ src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script>
+{%endif%}
+{%endblock%}
diff --git a/gn2/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html b/gn2/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html
new file mode 100644
index 00000000..c1ef6001
--- /dev/null
+++ b/gn2/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html
@@ -0,0 +1,115 @@
+{%extends "base.html"%}
+
+{%block title%}Partial Correlations:{%endblock%}
+
+{%block css%}
+<link rel="stylesheet" type="text/css"
+ href="{{url_for('css', filename='DataTables/css/jquery.dataTables.css')}}" />
+<link rel="stylesheet" type="text/css"
+ href="{{url_for('js', filename='DataTablesExtensions/buttonStyles/css/buttons.dataTables.min.css')}}">
+<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
+<link rel="stylesheet" type="text/css" href="/static/new/css/trait_list.css" />
+<link rel="stylesheet" type="text/css"
+ href="/static/new/css/partial_correlations.css" />
+{%endblock%}
+
+{%block content%}
+<div class="container">
+ <p>
+ <strong>Primary Trait</strong><br /><br />
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=primary['trait_name'],
+ dataset=primary['dataset_name'])}}"
+ title="Link to trait data for trait {{primary['trait_name']}}">
+ {{primary["dataset_type"]}}/{{primary["trait_name"]}}
+ [{{primary["symbol"] }} on Chr {{primary["chr"]}} @ {{primary["mb"]}}]:
+ {{primary["description"]}}
+ </a> --- FROM: {{primary["dataset_name"]}}
+ </p>
+ <p><strong>Control Traits</strong><br /><br />
+ {%for trait in controls:%}
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=trait['trait_name'],
+ dataset=trait['dataset_name'])}}"
+ title="Link to trait data for trait {{trait['trait_name']}}">
+ {{trait["dataset_type"]}}/{{trait["trait_name"]}}
+ [{{trait["symbol"] }} on Chr {{trait["chr"]}} @ {{trait["mb"]}}]:
+ {{trait["description"]}}
+ </a> --- FROM: {{trait["dataset_name"]}}<br />
+ {%endfor%}
+ </p>
+
+ <table id="part-corr-results-publish"
+ class="table-hover table-striped cell-border dataTable">
+ <thead>
+ <tr>
+ <th>_</th>
+ <th>Index</th>
+ <th>Database</th>
+ <th>Record</th>
+ <th>Symbol</th>
+ <th>Description</th>
+ <th>N</th>
+ {%if method == "spearmans":%}
+ <th>Partial rho</th>
+ <th>p(partial rho)</th>
+ <th>rho</th>
+ <th>p(rho)</th>
+ <th>delta rho</th>
+ {%else:%}
+ <th>Partial r</th>
+ <th>p(partial r)</th>
+ <th>r</th>
+ <th>p(r)</th>
+ <th>delta r</th>
+ {%endif%}
+ </tr>
+ </thead>
+
+ <tbody>
+ {%for idx, trait in enumerate(pcorrs, start=1):%}
+ <tr>
+ <td>
+ <input type="checkbox" name="chk_{{trait['trait_name']}}"
+ value="{{trait['trait_fullname']}}">
+ </td>
+ <td>{{idx}}</td>
+ <td>{{trait["dataset_name"]}}</td>
+ <td>
+ <a href="{{url_for(
+ 'show_trait_page',
+ trait_id=trait['trait_name'],
+ dataset=trait['dataset_name'])}}">
+ {{trait["trait_name"]}}
+ </a>
+ </td>
+ <td>{{trait["symbol"]}}</td>
+ <td>{{trait["description"]}}</td>
+ <td>{{trait["noverlap"]}}</td>
+ <td>{{format_number(trait["partial_corr"])}}</td>
+ <td>{{format_number(trait["partial_corr_p_value"])}}</td>
+ <td>{{format_number(trait["corr"])}}</td>
+ <td>{{format_number(trait["corr_p_value"])}}</td>
+ <td>{{format_number(trait["delta"])}}</td>
+ </tr>
+ {%else:%}
+ <tr>
+ <td colspan="12">
+ No correlations were computed
+ </td>
+ </tr>
+ {%endfor%}
+ </tbody>
+ </table>
+
+</div>
+{%endblock%}
+
+{%block js%}
+<!--
+ <script type="text/javascript"
+ src="/static/new/javascript/partial_correlations.js"></script>
+-->
+{%endblock%}
diff --git a/gn2/wqflask/templates/partial_correlations/pcorrs_select_operations.html b/gn2/wqflask/templates/partial_correlations/pcorrs_select_operations.html
new file mode 100644
index 00000000..fe7f8cd4
--- /dev/null
+++ b/gn2/wqflask/templates/partial_correlations/pcorrs_select_operations.html
@@ -0,0 +1,167 @@
+{%extends "base.html"%}
+
+{%block title%}Partial Correlations:{%endblock%}
+
+{%block css%}
+<link rel="stylesheet" type="text/css"
+ href="{{url_for('css', filename='DataTables/css/jquery.dataTables.css')}}" />
+<link rel="stylesheet" type="text/css"
+ href="{{url_for('js', filename='DataTablesExtensions/buttonStyles/css/buttons.dataTables.min.css')}}">
+<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
+<link rel="stylesheet" type="text/css" href="/static/new/css/trait_list.css" />
+<link rel="stylesheet" type="text/css"
+ href="/static/new/css/partial_correlations.css" />
+{%endblock%}
+
+{%block content%}
+<div class="container">
+ <form id="pcorrs-form"
+ method="POST"
+ action="{{url_for('partial_correlations')}}">
+ {%with messages = get_flashed_messages(with_categories=true)%}
+ {%if messages:%}
+ <ul class=flashes>
+ {%for category, message in messages:%}
+ <li class="{{category}}">{{message}}</li>
+ {%endfor%}
+ </ul>
+ {%endif%}
+ {%endwith%}
+
+ <input type="hidden" value="{{trait_list_str}}" name="trait_list">
+ <h1>Partial Correlation</h1>
+ <div>Please select one primary trait, one to three control traits, and at least one target trait.</div>
+ <br />
+ <table id="pcorrs_traits_table"
+ class="table-hover table-striped cell-border dataTable"
+ role="grid">
+ <thead>
+ <tr>
+ <th>Primary (X)</th>
+ <th>Controls (Z)</th>
+ <th>Targets (Y)</th>
+ <th>Ignored</th>
+ <th>Dataset</th>
+ <th>Trait ID</th>
+ <th>Symbol</th>
+ <th>Description</th>
+ <th>Location</th>
+ <th>Mean</th>
+ <th>Max LRS</th>
+ <th>Max LRS Location Chr and Mb</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {%for trait in traits:%}
+ <tr>
+ <td>
+ <input type="radio" name="trait_{{trait['trait_name']}}"
+ id="trait_{{trait['trait_name']}}"
+ value="primary_{{trait['trait_name']}}" />
+ </td>
+ <td>
+ <input type="radio" name="trait_{{trait['trait_name']}}"
+ id="trait_{{trait['trait_name']}}"
+ value="controls_{{trait['trait_name']}}" />
+ </td>
+ <td>
+ <input type="radio" name="trait_{{trait['trait_name']}}"
+ id="trait_{{trait['trait_name']}}"
+ value="targets_{{trait['trait_name']}}" checked="checked" />
+ </td>
+ <td>
+ <input type="radio" name="trait_{{trait['trait_name']}}"
+ id="trait_{{trait['trait_name']}}"
+ value="ignored_{{trait['trait_name']}}" />
+ </td>
+ <td>{{trait.get("dataset", "_")}}
+ <td>{{trait.get("trait_name", "_")}}</td>
+ <td>{{trait.get("symbol", "_")}}</td>
+ <td>{{trait.get("description", "_")}}</td>
+ <td>{{trait.get("location", "_")}}</td>
+ <td>{{trait.get("mean", "_")}}</td>
+ <td>{{trait.get("lrs", "_")}}</td>
+ <td>{{trait.get("lrs_location", "_")}}</td>
+ </tr>
+ {%endfor%}
+ </tbody>
+ </table>
+
+ <br />
+ <p>Compute partial correlations for target selected above:</p>
+ <button type="submit" class="btn btn-primary" name="submit"
+ value="with_target_pearsons">
+ Pearson's r
+ </button>
+ <button type="submit" class="btn btn-primary" name="submit"
+ value="with_target_spearmans">
+ Spearman's rho
+ </button>
+
+ <hr />
+
+ <p style="color: red; font-weight: bold;">OR</p>
+ <p>Compute partial correlation for each trait in the database below:</p>
+
+ <div class="form-group">
+ <label for="corr-method-input" class="form-label">Compute</label>
+ <select id="corr-method-input" required="required" name="method"
+ class="form-control">
+ <option value="Pearson's r">Pearson's r</option>
+ <option value="Spearman's rho">Spearman's rho</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="target-db-input" class="form-label">Choose Database</label>
+ <select id="target-db-input" required="required" name="target_db"
+ class="form-control">
+ {%if target_dbs:%}
+ {%for item in target_dbs:%}
+ {%if "description" in item.keys():%}
+ <option value="{{item['value']}}">{{item['description']}}</option>
+ {%else:%}
+ {%for group, opts in item.items()%}
+ {%if opts | length > 0:%}
+ <optgroup label="{{group}} ------">
+ {%for item2 in opts:%}
+ <option value="{{item2['value']}}">{{item2['description']}}</option>
+ {%endfor%}
+ </optgroup>
+ {%endif%}
+ {%endfor%}
+ {%endif%}
+ {%endfor%}
+ {%endif%}
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="criteria-input" class="form-label">Return</label>
+ <select id="criteria-input" required="required" name="criteria" size="1"
+ class="form-control">
+ <option value="100">top 100</option>
+ <option value="200">top 200</option>
+ <option value="500" selected="selected">top 500</option>
+ <option value="1000">top 1000</option>
+ <option value="2000">top 2000</option>
+ <option value="5000">top 5000</option>
+ <option value="10000">top 10000</option>
+ <option value="15000">top 15000</option>
+ <option value="20000">top 20000</option>
+ </select>
+ </div>
+
+ <button type="submit" class="btn btn-primary" name="submit"
+ value="Run Partial Correlations">
+ Run Partial Correlations
+ </button>
+ </form>
+</div>
+{%endblock%}
+
+{%block js%}
+<script type="text/javascript"
+ src="/static/new/javascript/partial_correlations.js"></script>
+{%endblock%}