diff options
author | zsloan | 2017-04-05 15:37:29 +0000 |
---|---|---|
committer | zsloan | 2017-04-05 15:37:29 +0000 |
commit | 0408cc61181eaeda95bd1f60f76dc5798e315663 (patch) | |
tree | ecf1bfa89b1ab93565ed07947da905142c9776d8 /wqflask/wqflask/templates/correlation_page.html | |
parent | 2b14b0d04387a262f9895ddd87ce465c6835fa8c (diff) | |
download | genenetwork2-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/correlation_page.html')
-rw-r--r-- | wqflask/wqflask/templates/correlation_page.html | 125 |
1 files changed, 69 insertions, 56 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 <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 <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;"> 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> 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;"> 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 %} {% 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> <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;"> <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, |