aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2016-04-11 22:58:25 +0000
committerzsloan2016-04-11 22:58:25 +0000
commita49c7c9bc8929cfda8f2e854beba440d0d874a4e (patch)
treef3a006a32c04eb1997c02acffec26b100a3a1320
parent6c03a5aeb95f37c477bed3f432790329a0bd5038 (diff)
downloadgenenetwork2-a49c7c9bc8929cfda8f2e854beba440d0d874a4e.tar.gz
Changing global gene search to use gsearch_gene.html instead of gsearch_gene_update.html
-rwxr-xr-xwqflask/wqflask/templates/gsearch_gene.html43
-rw-r--r--wqflask/wqflask/update_search_results.py7
-rw-r--r--wqflask/wqflask/views.py2
3 files changed, 21 insertions, 31 deletions
diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html
index 2ff75052..3f2888c2 100755
--- a/wqflask/wqflask/templates/gsearch_gene.html
+++ b/wqflask/wqflask/templates/gsearch_gene.html
@@ -28,6 +28,20 @@
<br />
<br />
<table width="2000px" class="table table-hover table-striped" id="trait_table">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Index</th>
+ <th>Record</th>
+ <th>Symbol</th>
+ <th>Description</th>
+ <th>Location</th>
+ <th>Mean</th>
+ <th>Max LRS</th>
+ <th>Max LRS Location</th>
+ <th>Additive Effect</th>
+ </tr>
+ </thead>
</table>
</div>
</div>
@@ -123,30 +137,13 @@
"serverSide": true,
"paging": false,
"ajax": {
- "url": "/gsearch_updating?terms={{ terms }}&type={{ type }}&draw=100",
+ "url": "/gsearch_updating?terms={{ terms }}&type={{ type }}",
"dataType": "json",
"contentType": "application/json; charset=utf-8",
"complete": function(response) {
console.log("Response:" + JSON.stringify(response));
}
},
- "columns": [
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "cust-txt" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural", "width": "15%" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "cust-txt" }
- ],
- "order": [[ 1, "asc" ]],
"buttons": [
{
extend: 'csvHtml5',
@@ -158,15 +155,9 @@
}
}
],
- "sDom": "RZBfrtiS",
+ "sDom": "Bfrti",
"scrollY": 800,
- "bDeferRender": true,
- "scroller": {
- "loadingIndicator": true
- },
- "colResize": {
- "tableWidthFixed": false,
- },
+ "bDeferRender": true
} );
console.timeEnd("Creating table");
diff --git a/wqflask/wqflask/update_search_results.py b/wqflask/wqflask/update_search_results.py
index 976fc1cd..6faf0d4b 100644
--- a/wqflask/wqflask/update_search_results.py
+++ b/wqflask/wqflask/update_search_results.py
@@ -14,7 +14,6 @@ class GSearch(object):
def __init__(self, kw):
self.type = kw['type']
self.terms = kw['terms']
- self.draw = int(kw['draw'])
#self.row_range = kw['row_range']
if self.type == "gene":
sql = """
@@ -43,8 +42,8 @@ class GSearch(object):
AND ProbeSetXRef.ProbeSetFreezeId=ProbeSetFreeze.Id
AND ProbeSetFreeze.public > 0
ORDER BY species_name, inbredset_name, tissue_name, probesetfreeze_name, probeset_name
- LIMIT %s
- """ % (self.terms, self.draw)
+ LIMIT 6000
+ """ % (self.terms)
with Bench("Running query"):
re = g.db.execute(sql).fetchall()
self.trait_list = []
@@ -101,7 +100,7 @@ class GSearch(object):
def convert_to_json(self):
json_dict = {}
- json_dict['draw'] = self.draw,
+ #json_dict['draw'] = self.draw,
json_dict['recordsTotal'] = len(self.trait_list),
json_dict['data'] = []
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index aa145969..6184edc7 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -164,7 +164,7 @@ def gsearchact():
result = gsearch.GSearch(request.args).__dict__
type = request.args['type']
if type == "gene":
- return render_template("gsearch_gene_updating.html", **result)
+ return render_template("gsearch_gene.html", **result)
elif type == "phenotype":
return render_template("gsearch_pheno.html", **result)