aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/templates
diff options
context:
space:
mode:
authorzsloan2017-04-05 15:37:29 +0000
committerzsloan2017-04-05 15:37:29 +0000
commit0408cc61181eaeda95bd1f60f76dc5798e315663 (patch)
treeecf1bfa89b1ab93565ed07947da905142c9776d8 /wqflask/wqflask/templates
parent2b14b0d04387a262f9895ddd87ce465c6835fa8c (diff)
downloadgenenetwork2-0408cc61181eaeda95bd1f60f76dc5798e315663.tar.gz
- Temporary traits can be created, viewed, and added to collections
- Correct PCA trait data is created but can't be saved yet - Added inner margins by increasing xDomain and yDomain of probability plot on trait page - Increased X/Y-axis label font size - Turned "processes" to 0 on runserver.py for PROD setting, since it doesn't work with threading - Improved appearance of correlation page table - Added links to github to index page - Removed js_data from GEMMA/PLINK mapping results, since it isn't used for those - Removed "Tissue" from trait page for phenotype traits
Diffstat (limited to 'wqflask/wqflask/templates')
-rw-r--r--wqflask/wqflask/templates/correlation_page.html125
-rwxr-xr-xwqflask/wqflask/templates/index_page_orig.html12
-rw-r--r--wqflask/wqflask/templates/marker_regression_gn1.html14
-rw-r--r--wqflask/wqflask/templates/show_trait.html4
-rw-r--r--wqflask/wqflask/templates/show_trait_details.html2
-rw-r--r--wqflask/wqflask/templates/show_trait_mapping_tools.html7
-rw-r--r--wqflask/wqflask/templates/submit_trait.html2
7 files changed, 99 insertions, 67 deletions
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index cedb65a1..3bde7dc7 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -32,65 +32,65 @@
<br />
<br />
- <div style="width: {% if target_dataset.type == "ProbeSet" %}1600px{% elif target_dataset.type == "Publish" %}1200px{% else %}800px{% endif %}; background-color: #eeeeee; border: 1px solid black;">
+ <div style="width: {% if target_dataset.type == "ProbeSet" %}1600px{% elif target_dataset.type == "Publish" %}1400px{% else %}800px{% endif %};">
<table width="1600px" id="trait_table" class="table table-hover table-striped">
<thead>
<tr>
- <th style="width: 30px; background-color: #eeeeee;"></th>
+ <th style="width: 30px;"></th>
{% for header in target_dataset.header_fields %}
{% if header == 'Year' %}
- <th style="text-align: right; background-color: #eeeeee;">{{header}}</th>
+ <th>{{header}}</th>
{% elif header == 'Max LRS' %}
- <th style="text-align: right; background-color: #eeeeee;">Max&nbsp;&nbsp;<br>LRS<a href="http://genenetwork.org//glossary.html#L" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
+ <th>Max LRS<a href="http://genenetwork.org//glossary.html#L" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
{% elif header == 'Max LRS Location' %}
- <th style="text-align: right; background-color: #eeeeee;">{{header}}</th>
+ <th>{{header}}</th>
{% elif header == 'Location' %}
- <th style="text-align: right; background-color: #eeeeee;">{{header}}</th>
+ <th>{{header}}</th>
{% elif header == 'Mean' %}
- <th style="text-align: right; background-color: #eeeeee;">{{header}}</th>
+ <th>{{header}}</th>
{% elif header == 'Additive Effect' %}
- <th style="text-align: right; background-color: #eeeeee;">Add&nbsp;&nbsp;<br>Effect<a href="http://genenetwork.org//glossary.html#A" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
+ <th>Additive Effect<a href="http://genenetwork.org//glossary.html#A" target="_blank"><sup style="color:#f00"> ?</sup></a></th>
{% elif header == 'Index' %}
- <th style="text-align: right; background-color: #eeeeee; padding-left: 0px; margin-left: 0px;">{{header}}</th>
+ <th>{{header}}</th>
{% elif header == 'N' %}
- <th style="text-align: right; background-color: #eeeeee;">{{header}}</th>
+ <th>{{header}}</th>
{% else %}
- <th style="background-color: #eeeeee;">{{header}}</th>
+ <th>{{header}}</th>
{% endif %}
{% endfor %}
{% if target_dataset.type == "ProbeSet" %}
{% if corr_method == 'pearson' %}
- <th style="text-align: right; background-color: #eeeeee;">Sample r</th>
- <th style="text-align: right; background-color: #eeeeee;">&nbsp;&nbsp;N</th>
- <th style="text-align: right; background-color: #eeeeee;">Sample p(r)</th>
- <th style="text-align: right; background-color: #eeeeee;">Lit r</th>
- <th style="text-align: right; background-color: #eeeeee;">Tissue r</th>
+ <th>Sample r</th>
+ <th>&nbsp;&nbsp;N</th>
+ <th>Sample p(r)</th>
+ <th>Lit r</th>
+ <th>Tissue r</th>
{% else %}
- <th style="text-align: right; background-color: #eeeeee;">Sample rho</th>
- <th style="text-align: right; background-color: #eeeeee;">N</th>
- <th style="text-align: right; background-color: #eeeeee;">Sample p(rho)</th>
- <th style="text-align: right; background-color: #eeeeee;">Lit r</th>
- <th style="text-align: right; background-color: #eeeeee;">Tissue rho</th>
+ <th>Sample rho</th>
+ <th>N</th>
+ <th>Sample p(rho)</th>
+ <th>Lit r</th>
+ <th>Tissue rho</th>
{% endif %}
{% elif target_dataset.type == "Publish" %}
{% if corr_method == 'pearson' %}
- <th style="text-align: right; background-color: #eeeeee;">Sample r</th>
- <th style="text-align: right; background-color: #eeeeee;">&nbsp;&nbsp;N</th>
- <th style="text-align: right; background-color: #eeeeee;">Sample p(r)</th>
+ <th>Sample r</th>
+ <th>&nbsp;&nbsp;N</th>
+ <th>Sample p(r)</th>
{% else %}
- <th style="text-align: right; background-color: #eeeeee;">Sample rho</th>
- <th style="text-align: right; background-color: #eeeeee;">&nbsp;&nbsp;N</th>
- <th style="text-align: right; background-color: #eeeeee;">Sample p(rho)</th>
+ <th>Sample rho</th>
+ <th>&nbsp;&nbsp;N</th>
+ <th>Sample p(rho)</th>
{% endif %}
{% elif target_dataset.type == "Geno" %}
{% if corr_method == 'pearson' %}
- <th style="text-align: right; background-color: #eeeeee;">Sample r</th>
- <th style="text-align: right; background-color: #eeeeee;">N</th>
- <th style="text-align: right; background-color: #eeeeee;">Sample p(r)</th>
+ <th>Sample r</th>
+ <th>N</th>
+ <th>Sample p(r)</th>
{% else %}
- <th style="text-align: right; background-color: #eeeeee;">Sample rho</th>
- <th style="text-align: right; background-color: #eeeeee;">N</th>
- <th style="text-align: right; background-color: #eeeeee;">Sample p(rho)</th>
+ <th>Sample rho</th>
+ <th>N</th>
+ <th>Sample p(rho)</th>
{% endif %}
{% endif %}
</tr>
@@ -99,7 +99,7 @@
<tbody>
{% for trait in correlation_results %}
<tr>
- <td>&nbsp;<INPUT TYPE="checkbox" NAME="searchResult" class="checkbox trait_checkbox" style="transform: scale(1.5);" VALUE="{{ data_hmac('{}:{}'.format(trait.name, trait.dataset.name)) }}"></td>
+ <td align="center" style="padding-right: 0px;">&nbsp;<INPUT TYPE="checkbox" NAME="searchResult" class="checkbox trait_checkbox" style="padding-right: 0px;" VALUE="{{ data_hmac('{}:{}'.format(trait.name, trait.dataset.name)) }}"></td>
<td align="right">{{ loop.index }}</td>
<td>
<a href="{{ url_for('show_trait_page',
@@ -114,21 +114,21 @@
<td>{{ trait.description_display }}</TD>
<td align="right"style="white-space: nowrap;">{{ trait.location_repr }}</td>
<td align="right">{{ '%0.3f' % trait.mean|float }}</td>
- <td align="right" style="padding-right: 15px;">{% if trait.LRS_score_repr != "N/A" %}{{ '%0.1f' % trait.LRS_score_repr|float }}{% else %}N/A{% endif %}</td>
- <td align="right" style="padding-right: 15px;">{{ trait.LRS_location_repr }}</td>
- <td align="right" style="padding-right: 15px;">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
- <td align="right" style="padding-right: 15px;"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
- <td align="right" style="padding-right: 15px;">{{ trait.num_overlap }}</td>
- <td align="right" style="padding-right: 15px;">{{'%0.3e'|format(trait.sample_p)}}</td>
+ <td align="right">{% if trait.LRS_score_repr != "N/A" %}{{ '%0.1f' % trait.LRS_score_repr|float }}{% else %}N/A{% endif %}</td>
+ <td align="right">{{ trait.LRS_location_repr }}</td>
+ <td align="right">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
+ <td align="right"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
+ <td align="right">{{ trait.num_overlap }}</td>
+ <td align="right">{{'%0.3e'|format(trait.sample_p)}}</td>
{% if trait.lit_corr == "" or trait.lit_corr == 0.000 %}
- <td align="right" style="padding-right: 15px;">--</td>
+ <td align="right">--</td>
{% else %}
- <td align="right" style="padding-right: 15px;">{{'%0.3f'|format(trait.lit_corr)}}</td>
+ <td align="right">{{'%0.3f'|format(trait.lit_corr)}}</td>
{% endif %}
{% if trait.tissue_corr == "" or trait.tissue_corr == 0.000 %}
- <td align="right" style="padding-right: 15px;">--</td>
+ <td align="right">--</td>
{% else %}
- <td align="right" style="padding-right: 15px;">{{'%0.3f'|format(trait.tissue_corr)}}</td>
+ <td align="right">{{'%0.3f'|format(trait.tissue_corr)}}</td>
{% endif %}
{% elif target_dataset.type == "Publish" %}
<td>{{ trait.description_display }}</td>
@@ -138,17 +138,17 @@
{{ trait.pubmed_text }}
</a>
</td>
- <td align="right" style="padding-right: 15px;">{{ trait.LRS_score_repr }}</td>
- <td align="right" style="padding-right: 15px;">{{ trait.LRS_location_repr }}</td>
- <td align="right" style="padding-right: 15px;">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
- <td align="right" style="padding-right: 15px;"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
- <td align="right" style="padding-right: 15px;">{{ trait.num_overlap }}</td>
- <td align="right" style="padding-right: 15px;">{{'%0.3e'|format(trait.sample_p)}}</td>
+ <td align="right">{{ trait.LRS_score_repr }}</td>
+ <td align="right">{{ trait.LRS_location_repr }}</td>
+ <td align="right">{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}</td>
+ <td align="right"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
+ <td align="right">{{ trait.num_overlap }}</td>
+ <td align="right">{{'%0.3e'|format(trait.sample_p)}}</td>
{% elif target_dataset.type == "Geno" %}
- <td align="right" style="padding-right: 15px;">{{ trait.location_repr }}</TD>
- <td align="right" style="padding-right: 15px;"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
- <td align="right" style="padding-right: 15px;">{{ trait.num_overlap }}</td>
- <td align="right" style="padding-right: 15px;">{{'%0.3e'|format(trait.sample_p)}}</td>
+ <td align="right">{{ trait.location_repr }}</TD>
+ <td align="right"><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td>
+ <td align="right">{{ trait.num_overlap }}</td>
+ <td align="right">{{'%0.3e'|format(trait.sample_p)}}</td>
{% endif %}
</tr>
{% endfor %}
@@ -278,6 +278,13 @@
{ "type": "natural" },
{ "type": "natural" }
],
+ "createdRow": function ( row, data, index ) {
+ $('td', row).eq(4).attr('title', $('td', row).eq(4).text());
+ if ($('td', row).eq(4).text().length > 60) {
+ $('td', row).eq(4).text($('td', row).eq(4).text().substring(0, 60));
+ $('td', row).eq(4).text($('td', row).eq(4).text() + '...')
+ }
+ },
"order": [[12, "asc" ]],
"sDom": "Btir",
"autoWidth": false,
@@ -287,7 +294,6 @@
} );
var table = $('#trait_table').DataTable();
- new $.fn.dataTable.FixedHeader( table );
{% elif target_dataset.type == "Publish" %}
$('#trait_table').dataTable( {
@@ -311,7 +317,7 @@
{ "type": "natural" },
{ "type": "natural" },
{ "type": "natural", "width": "25%" },
- { "type": "natural", "width": "10%" },
+ { "type": "natural", "width": "15%" },
{ "type": "natural" },
{ "type": "natural" },
{ "type": "natural" },
@@ -320,6 +326,13 @@
{ "type": "natural" },
{ "type": "scientific" }
],
+ "createdRow": function ( row, data, index ) {
+ $('td', row).eq(4).attr('title', $('td', row).eq(4).text());
+ if ($('td', row).eq(4).text().length > 60) {
+ $('td', row).eq(4).text($('td', row).eq(4).text().substring(0, 60));
+ $('td', row).eq(4).text($('td', row).eq(4).text() + '...')
+ }
+ },
"order": [[11, "asc" ]],
"sDom": "Btir",
"autoWidth": false,
diff --git a/wqflask/wqflask/templates/index_page_orig.html b/wqflask/wqflask/templates/index_page_orig.html
index 1694eae5..72ced084 100755
--- a/wqflask/wqflask/templates/index_page_orig.html
+++ b/wqflask/wqflask/templates/index_page_orig.html
@@ -173,6 +173,16 @@
</div>
<div style="padding-left:120px" class="col-xs-4" style="width: 600px !important;">
+ <section id="websites">
+ <div class="page-header">
+ <h1>Github</h1>
+ </div>
+ <ul>
+ <li><a href="https://github.com/genenetwork/genenetwork2">GN2 Source Code</a></li>
+ <li><a href="https://github.com/genenetwork/sysmaintenance">System Maintenance Code</a></li>
+ <li><a href="https://github.com/genenetwork/genenetwork">GN1 Source Code</a></li>
+ </ul>
+ </section>
<section id="news-section">
<div class="page-header">
<h1>News</h1>
@@ -212,7 +222,7 @@
<section id="websites">
<div class="page-header">
- <h2>Links</h2>
+ <h1>Links</h1>
</div>
<h3>GeneNetwork v2:</h3>
<ul>
diff --git a/wqflask/wqflask/templates/marker_regression_gn1.html b/wqflask/wqflask/templates/marker_regression_gn1.html
index 6d3f9326..4cea51b2 100644
--- a/wqflask/wqflask/templates/marker_regression_gn1.html
+++ b/wqflask/wqflask/templates/marker_regression_gn1.html
@@ -137,9 +137,9 @@
<li id="gn1_map_tab">
<a href="#gn1_map" data-toggle="tab" aria-expanded="true">GN1 Map</a>
</li>
- {% if mapping_method != "gemma" %}
+ {% if mapping_method != "gemma" and mapping_method != "plink" %}
<li id="vector_map_tab">
- <a href="#vector_map" data-toggle="tab" {% if mapping_method != "gemma" %}aria-expanded="false"{% else %}aria-expanded="true"{% endif %}>Vector Map</a>
+ <a href="#vector_map" data-toggle="tab" {% if mapping_method != "gemma" and mapping_method != "plink" %}aria-expanded="false"{% else %}aria-expanded="true"{% endif %}>Vector Map</a>
</li>
{% endif %}
</ul>
@@ -161,7 +161,7 @@
{% endif %}
</div>
</div>
- {% if mapping_method != "gemma" %}
+ {% if mapping_method != "gemma" and mapping_method != "plink" %}
<div class="tab-pane {% if mapping_method == "gemma" %}active{% endif %}" id="vector_map">
<div id="chart_container">
<div class="qtlcharts" id="topchart"></div>
@@ -277,11 +277,13 @@
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.scientific.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.naturalSort.js"></script>
+ {% if mapping_method != "gemma" and mapping_method != "plink" %}
<script>
js_data = {{ js_data | safe }}
</script>
+ {% endif %}
- {% if mapping_method != "gemma" %}
+ {% if mapping_method != "gemma" and mapping_method != "plink" %}
<script language="javascript" type="text/javascript" src="/static/new/javascript/panelutil.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/chr_lod_chart.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/javascript/lod_chart.js"></script>
@@ -385,6 +387,7 @@
return $('#marker_regression_form').submit();
};
+ {% if mapping_method != "gemma" and mapping_method != "plink" %}
export_perm_data = function() {
var num_perm, perm_data;
num_perm = js_data.num_perm
@@ -393,7 +396,8 @@
$('input[name=perm_results]').val(json_perm_data);
$('#marker_regression_form').attr('action', '/export_perm_data');
return $('#marker_regression_form').submit();
- };
+ }
+ {% endif %}
</script>
diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html
index 772c4314..56b6cc62 100644
--- a/wqflask/wqflask/templates/show_trait.html
+++ b/wqflask/wqflask/templates/show_trait.html
@@ -17,7 +17,9 @@
{% block content %} <!-- Start of body -->
<!--
- {% if this_trait.dataset.type != 'Geno' %}
+ {% if dataset.type == 'Temp' %}
+ {{ header("{}".format("Temporary Trait")) }}
+ {% elif dataset.type != 'Geno' %}
{{ header("{}".format(this_trait.name_header_fmt),
'{}: {}'.format(this_trait.name, this_trait.description_fmt)) }}
{% else %}
diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html
index 547c3c27..a0c40c7f 100644
--- a/wqflask/wqflask/templates/show_trait_details.html
+++ b/wqflask/wqflask/templates/show_trait_details.html
@@ -3,10 +3,12 @@
<td>Species and Group</td>
<td>{{ this_trait.dataset.group.species }}, {{ this_trait.dataset.group.name }}</td>
</tr>
+ {% if this_trait.dataset.type == 'Publish' %}
<tr>
<td>Tissue</td>
<td>{{ this_trait.dataset.tissue }}</td>
</tr>
+ {% endif %}
{% if this_trait.dataset.type == 'ProbeSet' %}
{% if this_trait.symbol != None %}
<tr>
diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html
index 12ba80b9..23c09d05 100644
--- a/wqflask/wqflask/templates/show_trait_mapping_tools.html
+++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html
@@ -17,16 +17,17 @@
</li>
{% endif %}
{# if use_plink_gemma #}
- {% if dataset.group.mapping_id == "2" or dataset.group.mapping_id == "4" %}
+ {% for mapping_method in dataset.group.mapping_names %}
+ {% if mapping_method == "GEMMA" %}
<li class="active">
<a href="#gemma" data-toggle="tab">GEMMA</a>
</li>
- {% if dataset.group.mapping_id == "4" %}
+ {% elif mapping_method == "PLINK" %}
<li>
<a href="#plink" data-toggle="tab">PLINK</a>
</li>
{% endif %}
- {% endif %}
+ {% endfor %}
<!--<li>
<a href="#pair_scan" data-toggle="tab">Pair Scan</a>
</li>-->
diff --git a/wqflask/wqflask/templates/submit_trait.html b/wqflask/wqflask/templates/submit_trait.html
index 2529a4f4..8d624ffd 100644
--- a/wqflask/wqflask/templates/submit_trait.html
+++ b/wqflask/wqflask/templates/submit_trait.html
@@ -2,7 +2,7 @@
{% block title %}Trait Submission{% endblock %}
{% block content %}
<!-- Start of body -->
- <form method="post" action="/show_trait">
+ <form method="post" action="/show_temp_trait">
<div class="container-fluid">
{{ flash_me() }}