From eb4a6942d51f1f69135f95fb14587a6494732eda Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 21 Oct 2016 20:55:54 +0000 Subject: Added CSV table download option to both gene and pheno global search The "Database" part of the metadata isn't displayed for global search table downloads In both regular and global search, the table can not be sorted by whether the first column is checked Removed some unused datatables/javascript from the regular and global search page html --- wqflask/wqflask/export_traits.py | 3 +- .../static/new/javascript/search_results.js | 2 - wqflask/wqflask/templates/gsearch_gene.html | 97 ++++++++----------- wqflask/wqflask/templates/gsearch_pheno.html | 106 ++++++++------------- wqflask/wqflask/templates/search_result_page.html | 44 +-------- 5 files changed, 85 insertions(+), 167 deletions(-) diff --git a/wqflask/wqflask/export_traits.py b/wqflask/wqflask/export_traits.py index eeed72f1..f8fce929 100644 --- a/wqflask/wqflask/export_traits.py +++ b/wqflask/wqflask/export_traits.py @@ -22,7 +22,8 @@ def export_search_results_csv(targs): metadata = [] metadata.append(["Citations: Please see www.genenetwork.org/reference.html"]) - metadata.append(["Database: " + targs['database_name']]) + if targs['database_name'] != "None": + metadata.append(["Database: " + targs['database_name']]) metadata.append(["Date: " + datetime.datetime.now().strftime("%B %d, %Y")]) metadata.append(["Time: " + datetime.datetime.now().strftime("%H:%M GMT")]) metadata.append(["Status of data ownership: Possibly unpublished data; please see www.genenetwork.org/statusandContact.html for details on sources, ownership, and usage of these data."]) diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js index 5250523f..40fdff70 100644 --- a/wqflask/wqflask/static/new/javascript/search_results.js +++ b/wqflask/wqflask/static/new/javascript/search_results.js @@ -73,7 +73,6 @@ $(function() { }); $('.trait_checkbox:checkbox').change(function() { - console.log("CHANGED") change_buttons() if ($(this).is(":checked")) { @@ -108,7 +107,6 @@ $(function() { var button, buttons, item, num_checked, text, _i, _j, _k, _l, _len, _len2, _len3, _len4, _results, _results2; buttons = ["#add", "#remove"]; num_checked = $('.trait_checkbox:checked').length; - console.log("num_checked is:", num_checked); if (num_checked === 0) { for (_i = 0, _len = buttons.length; _i < _len; _i++) { button = buttons[_i]; diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html index 2d970b36..776b8d07 100644 --- a/wqflask/wqflask/templates/gsearch_gene.html +++ b/wqflask/wqflask/templates/gsearch_gene.html @@ -20,46 +20,51 @@ -

+
+ + + +
+
- - - - - - - - - - - - - + + + + + + + + + + + + + {% for this_trait in trait_list %} - - - - - - - - - - - - - + + + + + + + + + + + + + {% endfor %} @@ -105,27 +110,12 @@
IndexSpeciesGroupTissueDatasetRecordSymbolDescriptionLocationMeanMax  
LRS ?
Max LRS LocationAdditive
Effect ?
IndexSpeciesGroupTissueDatasetRecordSymbolDescriptionLocationMeanMax  
LRS ?
Max LRS LocationAdditive
Effect ?
{{ loop.index }}{{ this_trait.dataset.group.species }}{{ this_trait.dataset.group.name }}{{ this_trait.dataset.tissue }}{{ this_trait.dataset.name }}{{ this_trait.name }}{{ this_trait.symbol }}{{ this_trait.description_display }}{{ this_trait.location_repr }}{{ '%0.3f' % this_trait.mean|float }}{% if this_trait.LRS_score_repr != "N/A" %}{{ '%0.1f' % this_trait.LRS_score_repr|float }}{% else %}N/A{% endif %}{{ this_trait.LRS_location_repr }}{% if this_trait.additive != "" %}{{ '%0.3f' % this_trait.additive|float }}{% else %}N/A{% endif %}{{ loop.index }}{{ this_trait.dataset.group.species }}{{ this_trait.dataset.group.name }}{{ this_trait.dataset.tissue }}{{ this_trait.dataset.name }}{{ this_trait.name }}{{ this_trait.symbol }}{{ this_trait.description_display }}{{ this_trait.location_repr }}{{ '%0.3f' % this_trait.mean|float }}{% if this_trait.LRS_score_repr != "N/A" %}{{ '%0.1f' % this_trait.LRS_score_repr|float }}{% else %}N/A{% endif %}{{ this_trait.LRS_location_repr }}{% if this_trait.additive != "" %}{{ '%0.3f' % this_trait.additive|float }}{% else %}N/A{% endif %}