From 3bc5e361d135777c1c4cfc2cef5b6aca7a6fa984 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 3 Jun 2016 23:04:48 +0000 Subject: Made a bunch of changes to correlation and search result tables (mainly the former) and made all tables a little more compact by lessenning the padding --- .../packages/DataTables/css/jquery.dataTables.css | 4 +- .../DataTables/js/dataTables.naturalSort.js | 8 +- wqflask/wqflask/templates/correlation_page.html | 252 +++++++++++---------- wqflask/wqflask/templates/search_result_page.html | 2 + 4 files changed, 145 insertions(+), 121 deletions(-) diff --git a/wqflask/wqflask/static/new/packages/DataTables/css/jquery.dataTables.css b/wqflask/wqflask/static/new/packages/DataTables/css/jquery.dataTables.css index 931ec6b3..6540d01f 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/css/jquery.dataTables.css +++ b/wqflask/wqflask/static/new/packages/DataTables/css/jquery.dataTables.css @@ -20,7 +20,7 @@ table.dataTable tfoot th { } table.dataTable thead th, table.dataTable thead td { - padding: 10px 18px; + padding: 10px 18px 10px 0px; border-bottom: 1px solid #111; } table.dataTable thead th:active, @@ -69,7 +69,7 @@ table.dataTable tbody tr.selected { } table.dataTable tbody th, table.dataTable tbody td { - padding: 8px 10px; + padding: 4px 5px; } table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { border-top: 1px solid #ddd; diff --git a/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js b/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js index dbb40446..8b7fa8fd 100755 --- a/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js +++ b/wqflask/wqflask/static/new/packages/DataTables/js/dataTables.naturalSort.js @@ -49,16 +49,16 @@ function naturalSort (a, b) { jQuery.extend( jQuery.fn.dataTableExt.oSort, { "natural-asc": function ( a, b ) { // first check if null or n/a - if (a == "N/A" || a == "NA" || a == "") return 1; - else if (b == "N/A" || b == "NA" || b == "") return -1; + if (a == "N/A" || a == "NA" || a == "" || a == "--") return 1; + else if (b == "N/A" || b == "NA" || b == "" || b == "--") return -1; else { return naturalSort(a,b); } }, "natural-desc": function ( a, b ) { - if (a == "N/A" || a == "NA" || a == "") return 1; - else if (b == "N/A" || b == "NA" || b == "") return -1; + if (a == "N/A" || a == "NA" || a == "" || a == "--") return 1; + else if (b == "N/A" || b == "NA" || b == "" || b == "--") return -1; else { return naturalSort(a,b) * -1; } diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index efc94c42..c5b4477b 100755 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -3,8 +3,6 @@ - - {% endblock %} {% block content %} @@ -34,55 +32,65 @@

-
- +
+
- + {% for header in target_dataset.header_fields %} - {% if header == 'Max LRS' %} - + {% if header == 'Year' %} + + {% elif header == 'Max LRS' %} + + {% elif header == 'Max LRS Location' %} + + {% elif header == 'Location' %} + + {% elif header == 'Mean' %} + {% elif header == 'Additive Effect' %} - + + {% elif header == 'Index' %} + + {% elif header == 'N' %} + {% else %} - + {% endif %} {% endfor %} - {% if target_dataset.type == "ProbeSet" %} + {% if target_dataset.type == "ProbeSet" %} {% if corr_method == 'pearson' %} - - - - - - + + + + + {% else %} - - - - - - + + + + + {% endif %} {% elif target_dataset.type == "Publish" %} {% if corr_method == 'pearson' %} - - - + + + {% else %} - - - + + + {% endif %} {% elif target_dataset.type == "Geno" %} {% if corr_method == 'pearson' %} - - - + + + {% else %} - - - + + + {% endif %} {% endif %} @@ -91,58 +99,56 @@ {% for trait in correlation_results %} - - - + + + {% if target_dataset.type == 'ProbeSet' %} - - - - - - - - - - + + + + + + + + + + {% if trait.lit_corr == "" or trait.lit_corr == 0.000 %} - + {% else %} - + {% endif %} {% if trait.tissue_corr == "" or trait.tissue_corr == 0.000 %} - + {% else %} - + {% endif %} - {% elif target_dataset.type == "Publish" %} - - - + + - - - - - - + + + + + + + {% elif target_dataset.type == "Geno" %} - - - - + + + + {% endif %} {% endfor %} @@ -161,12 +167,8 @@ - - - -
Max  
LRS ?
{{header}}Max  
LRS ?
{{header}}{{header}}{{header}}Additive
Effect ?
Add  
Effect ?
{{header}}{{header}}{{header}}{{header}}Sample rN CasesSample p(r)Lit CorrTissue rTissue p(r)Sample r  NSample p(r)Lit rTissue rSample rhoN CasesSample p(rho)Lit CorrTissue rhoTissue p(rho)Sample rhoNSample p(rho)Lit rTissue rhoSample rN CasesSample p(r)Sample r  NSample p(r)Sample rhoN CasesSample p(rho)Sample rho  NSample p(rho)Sample rN CasesSample p(r)Sample rNSample p(r)Sample rhoN CasesSample p(rho)Sample rhoNSample p(rho)
- {{ loop.index }} +  {{ loop.index }} {{ trait.name }} - {{ trait.symbol }}{{ trait.description_display }}{{ trait.location_repr }}{{ '%0.3f' % trait.mean|float }}{{ '%0.3f' % trait.LRS_score_repr|float }}{{ trait.LRS_location_repr }}{{ '%0.3f' % trait.additive|float }}{{'%0.3f'|format(trait.sample_r)}}{{ trait.num_overlap }}{{'%0.3e'|format(trait.sample_p)}}{{ trait.symbol }}{{ trait.description_display }}{{ trait.location_repr }}{{ '%0.3f' % trait.mean|float }}{% if trait.LRS_score_repr != "N/A" %}{{ '%0.1f' % trait.LRS_score_repr|float }}{% else %}N/A{% endif %}{{ trait.LRS_location_repr }}{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}{{'%0.3f'|format(trait.sample_r)}}{{ trait.num_overlap }}{{'%0.3e'|format(trait.sample_p)}}----{{'%0.3f'|format(trait.lit_corr)}}{{'%0.3f'|format(trait.lit_corr)}}----{{'%0.3f'|format(trait.tissue_corr)}}{{'%0.3f'|format(trait.tissue_corr)}}{{'%0.3e'|format(trait.tissue_pvalue)}}{{ trait.description_display }}{{ trait.authors }} + {{ trait.description_display }}{{ trait.authors }} {{ trait.pubmed_text }} - {{ trait.LRS_score_repr }}{{ trait.LRS_location_repr }}{{ '%0.3f' % trait.additive|float }}{{'%0.3f'|format(trait.sample_r)}}{{ trait.num_overlap }}{{'%0.3e'|format(trait.sample_p)}}{{ trait.LRS_score_repr }}{{ trait.LRS_location_repr }}{% if trait.additive != "" %}{{ '%0.3f' % trait.additive|float }}{% else %}N/A{% endif %}{{'%0.3f'|format(trait.sample_r)}}{{ trait.num_overlap }}{{'%0.3e'|format(trait.sample_p)}}{{ trait.location_repr }}{{'%0.3f'|format(trait.sample_r)}}{{ trait.num_overlap }}{{'%0.3e'|format(trait.sample_p)}}{{ trait.location_repr }}{{'%0.3f'|format(trait.sample_r)}}{{ trait.num_overlap }}{{'%0.3e'|format(trait.sample_p)}}