diff options
author | Zachary Sloan | 2014-12-29 21:36:03 +0000 |
---|---|---|
committer | Zachary Sloan | 2014-12-29 21:36:03 +0000 |
commit | c05b56d96d0a86a0c88daea6ec5c68c5856741cd (patch) | |
tree | 383deb9cd081eb6d510565ddbad9152a557aa83a /wqflask | |
parent | 8ff77c08efabc715dccf36028fd227c907b22f90 (diff) | |
download | genenetwork2-c05b56d96d0a86a0c88daea6ec5c68c5856741cd.tar.gz |
Made a bunch of cosmetic changes to various pages and fixed a couple searches
Diffstat (limited to 'wqflask')
-rwxr-xr-x | wqflask/wqflask/correlation_matrix/show_corr_matrix.py | 2 | ||||
-rwxr-xr-x | wqflask/wqflask/do_search.py | 13 | ||||
-rwxr-xr-x | wqflask/wqflask/static/packages/bootstrap/css/bootstrap.css | 30 | ||||
-rwxr-xr-x | wqflask/wqflask/static/packages/bootstrap/css/docs.css | 14 | ||||
-rw-r--r-- | wqflask/wqflask/static/packages/bootstrap/css/non-responsive.css | 4 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/base.html | 4 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/collections/view.html | 107 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/index_page.html | 49 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/new_security/login_user.html | 2 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/search_result_page.html | 18 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/whats_new.html | 13 |
11 files changed, 130 insertions, 126 deletions
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 %} - <br /> <div class="container"> {% for category, message in messages %} <div class="alert {{ category }}">{{ message }}</div> @@ -72,7 +71,7 @@ <div> <ul class="nav navbar-nav"> <li class=""> - <a href="/">Home</a> + <a href="/">Search</a> </li> <li class=""> <a href="/help">Help</a> @@ -143,7 +142,6 @@ <a href="http://en.wikipedia.org/wiki/Linux">linux</a>, <a href="http://www.python.org/">python</a> and good intentions. </p> - <p>Special thanks to CYP1A2 and AHR.</p> <br /> <p>GeneNetwork is supported by:</p> <UL> diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 237a0d4e..3d777866 100755 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -1,5 +1,10 @@ {% extends "base.html" %} {% block title %}View Collection{% endblock %} +{% block css %} + <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/css/jquery.dataTables.css" /> + <link rel="stylesheet" type="text/css" href="/static/packages/DT_bootstrap/DT_bootstrap.css" /> + <link rel="stylesheet" type="text/css" href="/static/packages/TableTools/media/css/TableTools.css" /> +{% endblock %} {% block content %} <!-- Start of body --> {% if uc %} @@ -10,13 +15,7 @@ 'This collection has {}.'.format(numify(trait_obs|count, "record", "records"))) }} {% endif %} <div class="container"> - <div class="page-header"> - <h1>Your Collection</h1> - {% if uc %} - <h2>{{ uc.name }}</h2> - {% endif %} - - <div class="form-group"> + <div> {% if uc %} <form action="/collections/delete" method="post"> {% if uc %} @@ -51,40 +50,18 @@ <input type="submit" class="btn btn-primary" value="Heatmap" /> </div> </form> - </div> - - <!-- - <form action="/corr_matrix" method="post"> - {% if uc %} - <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" /> - {% endif %} - <input type="hidden" name="trait_list" id="trait_list" value= " - {% for this_trait in trait_obs %} - {{ this_trait.name }}:{{ this_trait.dataset.name }}, - {% endfor %}" > - <input type="submit" - class="btn btn-small" - value="Correlation Matrix" /> - </form> - <form action="/heatmap" method="post"> - {% if uc %} - <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" /> - {% endif %} - <input type="hidden" name="trait_list" id="trait_list" value= " - {% for this_trait in trait_obs %} - {{ this_trait.name }}:{{ this_trait.dataset.name }}, - {% endfor %}" > - <input type="submit" - class="btn btn-small" - value="Heatmap" /> - </form> - --> </div> - - - <div class="bs-docs-example"> - <table class="table table-hover" id='trait_table'> + <div> + <br /> + <br /> + <br /> + <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button> + <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button> + <button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button> + <br /> + <br /> + <table class="table table-hover table-striped" id='trait_table'> <thead> <tr> <th></th> @@ -126,15 +103,7 @@ </tbody> </table> - <br /> - - <button class="btn" id="select_all"><i class="icon-ok"></i> Select All</button> - <button class="btn" id="deselect_all"><i class="icon-remove"></i> Deselect All</button> - <button class="btn" id="invert"><i class="icon-resize-vertical"></i> Invert</button> - <button class="btn" id="add" disabled="disabled"><i class="icon-plus-sign"></i> Add Record to Other Collection</button> - <button class="btn" id="remove" disabled="disabled"><i class="icon-minus-sign"></i> Remove Record</button> - <button class="btn btn-primary pull-right"><i class="icon-download icon-white"></i> Download Table</button> </div> </div> @@ -144,4 +113,48 @@ {% block js %} <script type="text/javascript" src="/static/new/javascript/search_results.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.min.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/packages/DT_bootstrap/DT_bootstrap.js"></script> + <script language="javascript" type="text/javascript" src="/static/packages/TableTools/media/js/TableTools.min.js"></script> + <script language="javascript" type="text/javascript"> + $(document).ready( function () { + console.time("Creating table"); + $('#trait_table').dataTable( { + "aoColumns": [ + { "bSortable": false }, + { "sType": "natural" }, + { "sType": "natural", + "sWidth": "35%" }, + { "sType": "natural", + "sWidth": "15%" }, + { "sType": "cust-txt" }, + { "sType": "natural", + "sWidth": "10%" }, + { "sType": "natural", + "sWidth": "15%" }, + { "sType": "cust-txt" } + ], + "columns": [ + { "width": "50%" }, + null, + null, + null, + null, + null + ], + "sDom": "ftir", + "iDisplayLength": -1, + "autoWidth": true, + "bLengthChange": true, + "bDeferRender": true, + "bSortClasses": false + } ); + console.timeEnd("Creating table"); + }); + + </script> + + {% endblock %} + diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index 1caca702..adc004a5 100755 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -16,7 +16,7 @@ {{ flash_me() }} - <div class="row" style="width: 1200px !important;"> + <div class="row" style="width: 1400px !important;"> <div class="col-xs-5 col-xs-5"> <section id="search"> @@ -72,15 +72,20 @@ </div> <!-- GET ANY HELP --> + <div class="form-group"> + <label for="tfor" class="col-xs-1 control-label" style="width: 65px !important;"></label> + <div class="col-xs-10 controls"> + <p>Enter terms, genes, ID numbers in the + <b>Search</b> field<br> + Use <b>*</b> or <b>?</b> wildcards (Cyp*a?, + synap*)<br> + Use <b>quotes</b> for terms such as <i>"tyrosine + kinase"</i></p> + </div> + </div> - <p>Enter terms, genes, ID numbers in the - <b>Search</b> field<br> - Use <b>*</b> or <b>?</b> wildcards (Cyp*a?, - synap*)<br> - Use <b>quotes</b> for terms such as <i>"tyrosine - kinase"</i></p> - <!-- SEARCH, MAKE DEFAULT, ADVANCED SEARCH --> + <!-- SEARCH, MAKE DEFAULT --> <div class="form-group"> @@ -90,9 +95,6 @@ <div class="col-xs-4 controls" style="width: 150px !important;"> <input id="make_default" type="submit" class="btn btn-default form-control" value="Make Default"> </div> - <div class="col-xs-5 controls" style="width: 200px !important;"> - <input type="submit" class="btn btn-default form-control" value="Advanced Search"> - </div> </div> <input type="hidden" name="FormID" value="searchResult" class="form-control"> @@ -113,12 +115,16 @@ <p>To try them out copy these examples into the search field:</p> <ul> - <li><b>POSITION=(chr1 25 30)</b> finds genes, markers, or transcripts on + <!--<li><b>POSITION=(chr1 25 30)</b> finds genes, markers, or transcripts on chromosome 1 between 25 and 30 Mb.</li> <li><b>MEAN=(15 16) LRS=(23 46)</b> in the <b>Combined</b> field finds highly expressed genes (15 to 16 log2 units) AND with peak <a href="http://www.genenetwork.org/glossary.html#L" target="_blank">LRS</a> - linkage between 23 and 46.</li> + linkage between 23 and 46.</li>--> + + <li><b>MEAN=(15 16)</b> finds highly expressed genes (15 to 16 log2 units).</li> + + <li><b>LRS=(23 46)</b> finds genes with peak <a href="http://www.genenetwork.org/glossary.html#L" target="_blank">LRS</a> linkage between 23 and 46.</li> <li><b>RIF=mitochondrial</b> searches RNA databases for <a href="http://www.ncbi.nlm.nih.gov/projects/GeneRIF/GeneRIFhelp.html" target="_blank"> GeneRIF</a> links.</li> @@ -127,7 +133,7 @@ GeneWiki</a> for genes that you or other users have annotated with the word <i>nicotine</i>.</li> - <li><b>GO:0045202</b> searches for synapse-associated genes listed in the + <!--<li><b>GO:0045202</b> searches for synapse-associated genes listed in the <a href="http://www.godatabase.org/cgi-bin/amigo/go.cgi" target="_blank"> Gene Ontology</a>.</li> @@ -139,9 +145,10 @@ <li><b>RIF=diabetes LRS=(9 999 Chr2 100 105) transLRS=(9 999 10)</b> finds diabetes-associated transcripts with peak <a href="http://www.genenetwork.org/glossary.html#E" target="_blank"> trans eQTLs</a> on Chr 2 between 100 and 105 Mb with LRS - scores between 9 and 999.</li> + scores between 9 and 999.</li>--> </ul> </section> + <!-- <section id="tour-info"> <div class="page-header"> <h1>Tour and more info</h1> @@ -167,6 +174,7 @@ and advice on their use and citation.</p> </section> + --> <section id="websites"> <div class="page-header"> @@ -214,17 +222,6 @@ <li><a href="http://genenetwork.epfl.ch/" target="_blank"> Switzerland</a> at the EPFL</li> </ul> - <h3>History and archive</h3> - - <p>The - <a href="http://artemis.uthsc.edu" target="_blank"> - time machine</a> - has earlier versions that correspond to specific publication dates. - </p> - - <h3>The next generation</h3> - <p>Try the <a href="http://alexandria.uthsc.edu/" target="_blank"> - development</a> site to explore experimental data and features.</p> </section> <!--<section id="getting-started"> diff --git a/wqflask/wqflask/templates/new_security/login_user.html b/wqflask/wqflask/templates/new_security/login_user.html index 61df445c..ecf8278c 100755 --- a/wqflask/wqflask/templates/new_security/login_user.html +++ b/wqflask/wqflask/templates/new_security/login_user.html @@ -13,7 +13,7 @@ <h4>Don't have an account?</h4> - <a href="/n/register" class="btn btn-info modalize">Create a new account</a> + <a href="/n/register" class="btn btn-primary modalize">Create a new account</a> <hr /> diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 5e63a237..055ab979 100755 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -14,9 +14,15 @@ <input type="hidden" name="uc_id" id="uc_id" value="{{ uc_id }}"> - <p>We searched <a href="/dbdoc/{{dataset.fullname}}">{{ dataset.fullname }}</a></p> + <p>We searched <a href="/dbdoc/{{dataset.fullname}}">{{ dataset.fullname }}</a> + to find all records that match + {% for word in search_terms %} + <strong>{{word.search_term[0]}}</strong> {% if not loop.last %} or {% endif %} + {% endfor %}. + + </p> - <p>To find all records that match:</p> + <!-- <ul> {% if search_terms %} <li> @@ -26,9 +32,9 @@ </li> {% endif %} </ul> + --> - <p>To study a record, click on its ID below.<br /> - Check records below and click Add button to add to selection.</p> + <p>To study a record, click on its ID below. Check records below and click Add button to add to selection.</p> <div> <br /> @@ -174,7 +180,7 @@ null, null ], - "sDom": "ftir", + "sDom": "tir", "iDisplayLength": -1, "autoWidth": true, "bLengthChange": true, @@ -205,7 +211,7 @@ null, null ], - "sDom": "ftir", + "sDom": "tir", "iDisplayLength": -1, "autoWidth": true, "bLengthChange": true, diff --git a/wqflask/wqflask/templates/whats_new.html b/wqflask/wqflask/templates/whats_new.html index dca9e7b3..753c0d7d 100755 --- a/wqflask/wqflask/templates/whats_new.html +++ b/wqflask/wqflask/templates/whats_new.html @@ -3,25 +3,14 @@ {% block content %} <!-- Start of body --> - <TR> - <TD bgColor=#eeeeee class="solidBorder"> - <Table width= "100%" cellSpacing=0 cellPadding=5><TR> <!-- Body Start from Here --> - <TD valign="top" height="200" width="100%" bgcolor="#eeeeee"> - - <P class="title">Latest Updates and News from Genenetwork <A HREF="/webqtl/main.py?FormID=editHtml"><img src="/images/modify.gif" alt="modify this page" border= 0 valign="middle"></A></P> - - + <P class="title">Latest Updates and News from Genenetwork </P> {% for news_item in news_items %} <h4>{{ news_item.title }} ({{ news_item.date }})</h4> {{ news_item.details | safe }} <br /><br /> {% endfor %} - <p /> - - </TD> - </TR> |