about summary refs log tree commit diff
diff options
context:
space:
mode:
authorzsloan2020-05-21 15:57:49 -0500
committerzsloan2020-05-21 15:57:49 -0500
commit24baaf4dc03844d34f4c4101179223cc4e0d9184 (patch)
tree2e4877287915a6d26891754c785889d23be1d43c
parent81ba67bb1f8f18983ae983e70d985eebe16acde1 (diff)
downloadgenenetwork2-24baaf4dc03844d34f4c4101179223cc4e0d9184.tar.gz
Made search result table width variable again and fixed row highlighting, though later I need to go through and redo a bunch of CSS stuff
-rw-r--r--wqflask/base/webqtlConfig.py1
-rw-r--r--wqflask/wqflask/static/new/css/show_trait.css4
-rw-r--r--wqflask/wqflask/templates/search_result_page.html46
3 files changed, 32 insertions, 19 deletions
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index 018d5d54..55407123 100644
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -58,6 +58,7 @@ PROTEIN_ATLAS_URL = "http://www.proteinatlas.org/search/%s"
 OPEN_TARGETS_URL = "https://genetics.opentargets.org/gene/%s"
 UNIPROT_URL = "https://www.uniprot.org/uniprot/%s"
 RGD_URL = "https://rgd.mcw.edu/rgdweb/elasticResults.html?term=%s&category=Gene&species=%s"
+PHENOGEN_URL = "https://phenogen.org/gene.jsp?speciesCB=Rn&auto=Y&geneTxt=%s&genomeVer=rn6&section=geneEQTL"
 
 # Temporary storage (note that this TMPDIR can be set as an
 # environment variable - use utility.tools.TEMPDIR when you
diff --git a/wqflask/wqflask/static/new/css/show_trait.css b/wqflask/wqflask/static/new/css/show_trait.css
index 09d5e1e3..a0e84474 100644
--- a/wqflask/wqflask/static/new/css/show_trait.css
+++ b/wqflask/wqflask/static/new/css/show_trait.css
@@ -2,6 +2,10 @@ tr .outlier {
     background-color: #ffff99;
 }
 
+table.dataTable tbody tr.selected {
+    background-color: #ffff00
+}
+
 #bar_chart_container {
     overflow-x:scroll;
 }
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 89ca6681..b238a28a 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -8,7 +8,7 @@
 {% endblock %}
 {% block content %}
 <!-- Start of body -->
-    <div style="padding-left: 10px;">
+    <div style="padding-left: 10px;>
         <input type="hidden" name="uc_id" id="uc_id" value="{{ uc_id }}">
 
         <div style="padding-top: 10px; padding-bottom: 10px; font-size: 16px;">
@@ -59,7 +59,7 @@
 
         </div>
 
-        <div>
+        <div style="min-width: 950px;">
           <form id="trait_submission_form" target="_blank" action="/corr_matrix" method="post">
             <input type="hidden" name="tool_used" value="" />
             <input type="hidden" name="form_url" value="" />
@@ -111,29 +111,34 @@
         <div>
           <br />
           <form id="export_form" method="POST" action="/export_traits_csv" style="display: inline;">
-            <input type="hidden" name="headers" id="headers" value="{% for field in header_fields %}{{ field }},{% endfor %}">
-            <input type="hidden" name="search_string" id="search_string" value="{{ original_search_string }}">
-            <input type="hidden" name="database_name" id="database_name" value="{{ dataset.fullname }}">
-            <input type="hidden" name="file_name" id="file_name" value="search_results">
-            <input type="hidden" name="filter_term" id="filter_term" value="None">
-            {% if dataset.accession_id is defined %}
-            <input type="hidden" name="accession_id" id="accession_id" value="{{ dataset.accession_id }}">
-            {% endif %}
-            <input type="hidden" name="export_data" id="export_data" value="">
-            <button class="btn btn-default" id="select_all" type="button"><span class="glyphicon glyphicon-ok"></span> Select</button>
-            <button class="btn btn-default" id="add" type="button" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
-            <button class="btn btn-default" id="export_traits">Download CSV</button>
-            <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ...">
-            <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ...">
-            <button class="btn btn-default" id="deselect_all" type="button"><span class="glyphicon glyphicon-remove"></span> Deselect</button>
+            <div style="min-width: 950px;">
+              <input type="hidden" name="headers" id="headers" value="{% for field in header_fields %}{{ field }},{% endfor %}">
+              <input type="hidden" name="search_string" id="search_string" value="{{ original_search_string }}">
+              <input type="hidden" name="database_name" id="database_name" value="{{ dataset.fullname }}">
+              <input type="hidden" name="file_name" id="file_name" value="search_results">
+              <input type="hidden" name="filter_term" id="filter_term" value="None">
+              {% if dataset.accession_id is defined %}
+              <input type="hidden" name="accession_id" id="accession_id" value="{{ dataset.accession_id }}">
+              {% endif %}
+              <input type="hidden" name="export_data" id="export_data" value="">
+              <button class="btn btn-default" id="select_all" type="button"><span class="glyphicon glyphicon-ok"></span> Select</button>
+              <button class="btn btn-default" id="add" type="button" disabled><span class="glyphicon glyphicon-plus-sign"></span> Add</button>
+              <button class="btn btn-default" id="export_traits">Download CSV</button>
+              <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ...">
+              <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ...">
+              <button class="btn btn-default" id="deselect_all" type="button"><span class="glyphicon glyphicon-remove"></span> Deselect</button>
+            </div>
           </form>
           <br />
+          {% if dataset.type != 'Geno' %}
           <br />
           <div style="margin-bottom: 5px;">
             <b>Show/Hide Columns:</b>
           </div>
+          {% endif %}
+          <!--<div id="table_container" style="min-width: {% if dataset.type == 'ProbeSet' or dataset.type == 'Publish' %}2000{% else %}380{% endif %}px;">-->
           <div id="table_container">
-            <table class="table-hover table-striped cell-border" id='trait_table' style="max-width: {% if dataset.type == 'ProbeSet' or dataset.type == 'Publish' %}2000{% else %}380{% endif %}px; float: left;">
+            <table class="table-hover table-striped cell-border" id='trait_table' style="float: left; width: {% if dataset.type == 'Geno' %}380px{% else %}100%{% endif %};">
                 <tbody>
                  <td colspan="100%" align="center"><br><b><font size="15">Loading...</font></b><br></td>
                 </tbody>
@@ -341,7 +346,6 @@
                     {
                       'title': "Description",
                       'type': "natural",
-                      'width': "800px",
                       'data': null,
                       'render': function(data, type, row, meta) {
 			                  try {
@@ -420,6 +424,7 @@
                     }{% endif %}
                 ],
                 "order": [[1, "asc" ]],
+                {% if dataset.type != 'Geno' %}
                 buttons: [
                     {
                         extend: 'columnsToggle',
@@ -434,6 +439,9 @@
                     }
                 ],
                 'sDom': "Bitir",
+                {% else %}
+                'sDom': "itir",
+                {% endif %}
                 'deferRender': true,
                 'paging': false,
                 'orderClasses': true,