From 8ff77c08efabc715dccf36028fd227c907b22f90 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Fri, 12 Dec 2014 19:28:16 +0000 Subject: Added a additive effect column to search result and collection tables Fixed the header so that it looks fine when resizing --- wqflask/base/data_set.py | 6 +- wqflask/base/trait.py | 12 +- wqflask/wqflask/collect.py | 1 + wqflask/wqflask/do_search.py | 6 +- .../static/packages/bootstrap/css/bootstrap.css | 2 +- .../wqflask/static/packages/bootstrap/css/docs.css | 2 +- .../packages/bootstrap/css/non-responsive.css | 8 +- wqflask/wqflask/templates/collections/view.html | 2 + wqflask/wqflask/templates/index_page.html | 171 +++++++++++---------- .../wqflask/templates/new_security/login_user.html | 23 ++- wqflask/wqflask/templates/search_result_page.html | 16 +- .../show_trait_calculate_correlations.html | 28 ++-- .../templates/show_trait_mapping_tools.html | 64 ++++---- wqflask/wqflask/views.py | 2 +- 14 files changed, 173 insertions(+), 170 deletions(-) diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 7e187802..15a8c7cc 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -639,7 +639,8 @@ class PhenotypeDataSet(DataSet): 'Authors', 'Year', 'Max LRS', - 'Max LRS Location'] + 'Max LRS Location', + 'Add. Effect'] self.type = 'Publish' @@ -899,7 +900,8 @@ class MrnaAssayDataSet(DataSet): 'Location', 'Mean Expr', 'Max LRS', - 'Max LRS Location'] + 'Max LRS Location', + 'Add. Effect'] # Todo: Obsolete or rename this field self.type = 'ProbeSet' diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 6d070d54..58bed865 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -396,7 +396,7 @@ class GeneralTrait(object): if self.dataset.type == 'ProbeSet' and not self.cellid: query = """ SELECT - ProbeSetXRef.Locus, ProbeSetXRef.LRS, ProbeSetXRef.pValue, ProbeSetXRef.mean + ProbeSetXRef.Locus, ProbeSetXRef.LRS, ProbeSetXRef.pValue, ProbeSetXRef.mean, ProbeSetXRef.additive FROM ProbeSetXRef, ProbeSet WHERE @@ -409,7 +409,7 @@ class GeneralTrait(object): #trait_qtl = self.cursor.fetchone() if trait_qtl: print("trait_qtl:", trait_qtl) - self.locus, self.lrs, self.pvalue, self.mean = trait_qtl + self.locus, self.lrs, self.pvalue, self.mean, self.additive= trait_qtl print("self.locus:", self.locus) if self.locus: query = """ @@ -425,13 +425,13 @@ class GeneralTrait(object): else: self.locus = self.locus_chr = self.locus_mb = "" else: - self.locus = self.locus_chr = self.locus_mb = self.lrs = self.pvalue = self.mean = "" + self.locus = self.locus_chr = self.locus_mb = self.lrs = self.pvalue = self.mean = self.additive = "" if self.dataset.type == 'Publish': trait_qtl = g.db.execute(""" SELECT - PublishXRef.Locus, PublishXRef.LRS + PublishXRef.Locus, PublishXRef.LRS, PublishXRef.additive FROM PublishXRef, PublishFreeze WHERE @@ -440,9 +440,9 @@ class GeneralTrait(object): PublishFreeze.Id =%s """, (self.name, self.dataset.id)).fetchone() if trait_qtl: - self.locus, self.lrs = trait_qtl + self.locus, self.lrs, self.additive = trait_qtl else: - self.locus = self.lrs = "" + self.locus = self.lrs = self.additive = "" else: raise KeyError, `self.name`+' information is not found in the database.' diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 1105543c..df4507fb 100755 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -315,6 +315,7 @@ def view_collection(): name, dataset_name = atrait.split(':') trait_ob = trait.GeneralTrait(name=name, dataset_name=dataset_name) + trait_ob.retrieve_info(get_qtl_info=True) trait_ob.get_info() trait_obs.append(trait_ob) diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index 17fbc535..f9082495 100755 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -118,7 +118,8 @@ class MrnaAssaySearch(DoSearch): 'Location', 'Mean', 'Max LRS', - 'Max LRS Location'] + 'Max LRS Location', + 'Additive Effect'] def compile_final_query(self, from_clause = '', where_clause = ''): """Generates the final query string""" @@ -188,7 +189,8 @@ class PhenotypeSearch(DoSearch): 'Authors', 'Year', 'Max LRS', - 'Max LRS Location'] + 'Max LRS Location', + 'Additive Effect'] def get_fields_clause(self): """Generate clause for WHERE portion of query""" diff --git a/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css b/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css index 2c93dac8..0bf1f944 100755 --- a/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css @@ -1215,7 +1215,7 @@ a.bg-danger:hover { } .page-header { padding-bottom: 9px; - margin: 40px 0 20px; + margin: 20px 0 20px; border-bottom: 1px solid #eee; } ul, diff --git a/wqflask/wqflask/static/packages/bootstrap/css/docs.css b/wqflask/wqflask/static/packages/bootstrap/css/docs.css index 50710348..ea4d6994 100755 --- a/wqflask/wqflask/static/packages/bootstrap/css/docs.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/docs.css @@ -55,7 +55,7 @@ body > .navbar .brand:hover { /* padding for in-page bookmarks and fixed navbar */ section { - padding-top: 30px; + padding-top: 0px; } section > .page-header, section > .lead { diff --git a/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css b/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css index 799df47f..c3a11092 100644 --- a/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css @@ -6,7 +6,7 @@ /* Account for fixed navbar */ body { - min-width: 970px; + min-width: 1200px; padding-top: 70px; padding-bottom: 30px; } @@ -28,7 +28,7 @@ body { /* Reset the container */ .container { - width: 970px; + width: 1200px; max-width: none !important; } @@ -59,10 +59,6 @@ body { border-top: 0; } -.navbar-brand { - margin-left: -15px; -} - /* Always apply the floated nav */ .navbar-nav { float: left; diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 89bccffa..237a0d4e 100755 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -94,6 +94,7 @@ Mean Max LRS Max LRS Location + Additive Effect @@ -118,6 +119,7 @@ {{ this_trait.mean }} {{ this_trait.LRS_score_repr }} {{ this_trait.LRS_location_repr }} + {{ this_trait.additive }} {% endfor %} diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index b3fd3f6f..1caca702 100755 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -3,12 +3,14 @@ {% block content %} +
@@ -16,7 +18,91 @@
-
+
+ +
+
-->
-
- -
diff --git a/wqflask/wqflask/templates/new_security/login_user.html b/wqflask/wqflask/templates/new_security/login_user.html index 3378846a..61df445c 100755 --- a/wqflask/wqflask/templates/new_security/login_user.html +++ b/wqflask/wqflask/templates/new_security/login_user.html @@ -2,8 +2,6 @@ {% block title %}Register{% endblock %} {% block content %} - {{ header("Sign in", "Gain access to GeneNetwork") }} -