From c05b56d96d0a86a0c88daea6ec5c68c5856741cd Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Mon, 29 Dec 2014 21:36:03 +0000 Subject: Made a bunch of cosmetic changes to various pages and fixed a couple searches --- .../wqflask/correlation_matrix/show_corr_matrix.py | 2 +- wqflask/wqflask/do_search.py | 13 +-- .../static/packages/bootstrap/css/bootstrap.css | 30 +++--- .../wqflask/static/packages/bootstrap/css/docs.css | 14 +-- .../packages/bootstrap/css/non-responsive.css | 4 +- wqflask/wqflask/templates/base.html | 4 +- wqflask/wqflask/templates/collections/view.html | 107 ++++++++++++--------- wqflask/wqflask/templates/index_page.html | 49 +++++----- .../wqflask/templates/new_security/login_user.html | 2 +- wqflask/wqflask/templates/search_result_page.html | 18 ++-- wqflask/wqflask/templates/whats_new.html | 13 +-- 11 files changed, 130 insertions(+), 126 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py index 8bd5919b..d734117e 100755 --- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py +++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py @@ -193,7 +193,7 @@ class CorrelationMatrix(object): m = robjects.r.matrix(corr_results_to_list, nrow=len(cols)) eigen = base.eigen(m) print("eigen:", eigen) - #pca = stats.princomp(m, cor = "TRUE") + pca = stats.princomp(m, cor = "TRUE") print("pca:", pca) return pca diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index f9082495..fd7bd916 100755 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -96,7 +96,7 @@ class QuickMrnaAssaySearch(DoSearch): class MrnaAssaySearch(DoSearch): - """A search within an mRNA expression dataset""" + """A search within an expression dataset, including mRNA, protein, SNP, but not phenotype or metabolites""" DoSearch.search_types['ProbeSet'] = "MrnaAssaySearch" @@ -358,7 +358,7 @@ class RifSearch(MrnaAssaySearch): def run(self): where_clause = """( %s.symbol = GeneRIF_BASIC.symbol and MATCH (GeneRIF_BASIC.comment) - AGAINST ('+%s' IN BOOLEAN MODE)) """ % (self.dataset.type, self.search_term) + AGAINST ('+%s' IN BOOLEAN MODE)) """ % (self.dataset.type, self.search_term[0]) from_clause = ", GeneRIF_BASIC " query = self.compile_final_query(from_clause, where_clause) @@ -375,8 +375,8 @@ class WikiSearch(MrnaAssaySearch): and GeneRIF.versionId=0 and GeneRIF.display>0 and (GeneRIF.comment REGEXP '%s' or GeneRIF.initial = '%s') """ % (self.dataset.type, - "[[:<:]]"+self.search_term[0]+"[[:>:]]", - self.search_term[0]) + "[[:<:]]"+str(self.search_term[0])+"[[:>:]]", + str(self.search_term[0])) from_clause = ", GeneRIF " query = self.compile_final_query(from_clause, where_clause) @@ -390,7 +390,7 @@ class GoSearch(MrnaAssaySearch): def run(self): field = 'GOterm.acc' - go_id = 'GO:' + ('0000000'+self.search_term)[-7:] + go_id = 'GO:' + ('0000000'+self.search_term[0])[-7:] statements = ("""%s.symbol=GOgene_product.symbol and GOassociation.gene_product_id=GOgene_product.id and @@ -651,8 +651,9 @@ class PositionSearch(DoSearch): self.dataset.type, max(self.mb_min, self.mb_max)) - def real_run(self): + def run(self): + self.setup() self.query = self.compile_final_query(where_clause = self.where_clause) return self.execute(self.query) diff --git a/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css b/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css index 0bf1f944..3dc73a7a 100755 --- a/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css @@ -1038,7 +1038,7 @@ h2, .h2, h3, .h3 { - margin-top: 20px; + margin-top: 10px; margin-bottom: 10px; } h1 small, @@ -1080,27 +1080,27 @@ h6 .small, } h1, .h1 { - font-size: 36px; + font-size: 30px; } h2, .h2 { - font-size: 30px; + font-size: 24px; } h3, .h3 { - font-size: 24px; + font-size: 18px; } h4, .h4 { - font-size: 18px; + font-size: 14px; } h5, .h5 { - font-size: 14px; + font-size: 12px; } h6, .h6 { - font-size: 12px; + font-size: 10px; } p { margin: 0 0 10px; @@ -2884,7 +2884,7 @@ fieldset[disabled] .btn-default.active { } .btn-primary { color: #fff; - background-color: #428bca; + background-color: #369; border-color: #357ebd; } .btn-primary:hover, @@ -3872,7 +3872,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn { } .navbar { position: relative; - min-height: 50px; + min-height: 30px; border: 1px solid transparent; } /* @@ -3987,10 +3987,10 @@ select[multiple].input-group-sm > .input-group-btn > .btn { } .navbar-brand { float: left; - height: 50px; - padding: 15px 15px; - font-size: 18px; - line-height: 20px; + height: 30px; + padding: 6px 15px; + font-size: 15px; + line-height: 18px; } .navbar-brand:hover, .navbar-brand:focus { @@ -4738,8 +4738,8 @@ a.thumbnail.active { color: #333; } .alert { - padding: 15px; - margin-bottom: 20px; + padding: 10px; + margin-bottom: 5px; border: 1px solid transparent; border-radius: 4px; } diff --git a/wqflask/wqflask/static/packages/bootstrap/css/docs.css b/wqflask/wqflask/static/packages/bootstrap/css/docs.css index ea4d6994..b95c44ed 100755 --- a/wqflask/wqflask/static/packages/bootstrap/css/docs.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/docs.css @@ -27,7 +27,7 @@ h3 code { -------------------------------------------------- */ body > .navbar { - font-size: 14px; + font-size: 12px; font-weight: bold; } @@ -98,16 +98,16 @@ hr.soften { } .jumbotron h1 { - font-size: 80px; + font-size: 60px; font-weight: bold; letter-spacing: -1px; line-height: 1; } .jumbotron p { - font-size: 20px; + font-size: 15px; font-weight: 300; - line-height: 30px; - margin-bottom: 30px; + line-height: 20px; + margin-bottom: 10px; } /* Link styles (used on .masthead-links as well) */ @@ -230,10 +230,10 @@ hr.soften { border-bottom: 1px solid #ddd; } .subhead h1 { - font-size: 40px; + font-size: 30px; } .subhead p { - margin-bottom: 20px; + margin-bottom: 10px; } .subhead .navbar { display: none; diff --git a/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css b/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css index c3a11092..076b6dae 100644 --- a/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css @@ -13,7 +13,7 @@ body { /* Finesse the page header spacing */ .page-header { - margin-bottom: 30px; + margin-bottom: 10px; } .page-header .lead { margin-bottom: 10px; @@ -68,7 +68,7 @@ body { float: left; } .navbar-nav > li > a { - padding: 15px; + padding: 5px; } /* Redeclare since we override the float above */ diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 240481cc..3d4e6d28 100755 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -42,7 +42,6 @@ {% macro flash_me() -%} {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} -
{% for category, message in messages %}
{{ message }}
@@ -72,7 +71,7 @@