aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask
diff options
context:
space:
mode:
authorzsloan2016-03-03 17:02:07 +0000
committerzsloan2016-03-03 17:02:07 +0000
commitbf6d274a07afc45ce2700b82580f793f9054a4a7 (patch)
tree58b61c6c4af4ac95bdb381709b048eb8d7bcee74 /wqflask/wqflask
parentfa6aff6719cf180d4a5941d3ee6a538b33230124 (diff)
parent33248222ef32ba96c8efc43e02d9988eb0d41cc0 (diff)
downloadgenenetwork2-bf6d274a07afc45ce2700b82580f793f9054a4a7.tar.gz
Merge branch 'master' of https://github.com/genenetwork/genenetwork2
Diffstat (limited to 'wqflask/wqflask')
-rwxr-xr-xwqflask/wqflask/gsearch.py26
-rwxr-xr-xwqflask/wqflask/templates/show_trait.html15
2 files changed, 18 insertions, 23 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index 3d693a4c..a6efb47f 100755
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -5,6 +5,8 @@ from base.data_set import create_dataset
from base.trait import GeneralTrait
from dbFunction import webqtlDatabaseFunction
+from utility.benchmark import Bench
+
class GSearch(object):
def __init__(self, kw):
@@ -37,17 +39,21 @@ 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 1000
+ LIMIT 6000
""" % (self.terms)
- re = g.db.execute(sql).fetchall()
+ with Bench("Running query"):
+ re = g.db.execute(sql).fetchall()
self.trait_list = []
- for line in re:
- dataset = create_dataset(line[3], "ProbeSet")
- trait_id = line[4]
- this_trait = GeneralTrait(dataset=dataset, name=trait_id, get_qtl_info=True)
- self.trait_list.append(this_trait)
- species = webqtlDatabaseFunction.retrieve_species(dataset.group.name)
- dataset.get_trait_info([this_trait], species)
+ with Bench("Creating trait objects"):
+ for line in re:
+ dataset = create_dataset(line[3], "ProbeSet")
+ trait_id = line[4]
+ #with Bench("Building trait object"):
+ this_trait = GeneralTrait(dataset=dataset, name=trait_id, get_qtl_info=True, get_sample_info=False)
+ self.trait_list.append(this_trait)
+ species = webqtlDatabaseFunction.retrieve_species(dataset.group.name)
+ #with Bench("Getting trait info"):
+ dataset.get_trait_info([this_trait], species)
elif self.type == "phenotype":
sql = """
@@ -79,7 +85,7 @@ class GSearch(object):
OR Publication.Authors REGEXP "[[:<:]]%s[[:>:]]"
OR PublishXRef.Id REGEXP "[[:<:]]%s[[:>:]]")
ORDER BY Species.`Name`, InbredSet.`Name`, PublishXRef.`Id`
- LIMIT 1000
+ LIMIT 6000
""" % (self.terms, self.terms, self.terms, self.terms, self.terms, self.terms, self.terms, self.terms, self.terms, self.terms)
re = g.db.execute(sql).fetchall()
self.trait_list = []
diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html
index 29239adb..0d463d5b 100755
--- a/wqflask/wqflask/templates/show_trait.html
+++ b/wqflask/wqflask/templates/show_trait.html
@@ -9,7 +9,6 @@
<link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
<link rel="stylesheet" type="text/css" href="/static/new/packages/nvd3/nv.d3.min.css" />
<link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/css/jquery.dataTables.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/static/new/packages/noUiSlider/nouislider.css" />
<link rel="stylesheet" type="text/css" href="/static/new/packages/noUiSlider/nouislider.pips.css" />
<link rel="stylesheet" type="text/css" href="/static/packages/DT_bootstrap/DT_bootstrap.css" />
@@ -134,10 +133,6 @@
<script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/jspdf.plugin.from_html.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.js"></script>
- <script language="javascript" type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.0/js/dataTables.buttons.min.js"></script>
- <script language="javascript" type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.0/js/buttons.html5.min.js"></script>
- <script language="javascript" type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.0/js/buttons.bootstrap.min.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.scientific.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.naturalSort.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.colResize.js"></script>
@@ -200,10 +195,7 @@
{ "bSortable": false },
{ "type": "cust-txt" }
],
- "buttons": [
- 'csv'
- ],
- "sDom": "RZBtr",
+ "sDom": "RZtr",
"iDisplayLength": -1,
"autoWidth": false,
"bLengthChange": true,
@@ -226,10 +218,7 @@
null,
{ "type": "cust-txt" }
],
- "buttons": [
- 'csv'
- ],
- "sDom": "RZBtr",
+ "sDom": "RZtr",
"iDisplayLength": -1,
"autoWidth": false,
"bLengthChange": true,