diff options
author | Lei Yan | 2015-07-10 20:12:00 +0000 |
---|---|---|
committer | Lei Yan | 2015-07-10 20:12:00 +0000 |
commit | aa159a17785cc415e81346963aa76f05f5f9d4ad (patch) | |
tree | ae0502dac39d8cf20115b58817df4931a03b727c /wqflask/wqflask/templates | |
parent | 239c5ff97a88bd9ae3c439ca244daca2696fe68b (diff) | |
parent | 840285e3533790760b763aaa43d3099f9b0a5d69 (diff) | |
download | genenetwork2-aa159a17785cc415e81346963aa76f05f5f9d4ad.tar.gz |
Merge https://github.com/genenetwork/genenetwork2
Diffstat (limited to 'wqflask/wqflask/templates')
17 files changed, 280 insertions, 656 deletions
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 462a59a2..78682710 100755 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -1,3 +1,4 @@ +{% from "base_macro.html" import header, flash_me, timeago %} <!DOCTYPE HTML> <html lang="en"> <html xmlns="http://www.w3.org/1999/xhtml"> @@ -10,12 +11,6 @@ <link REL="stylesheet" TYPE="text/css" href="/static/packages/bootstrap/css/bootstrap.css" /> <link REL="stylesheet" TYPE="text/css" href="/static/packages/bootstrap/css/non-responsive.css" /> <link REL="stylesheet" TYPE="text/css" href="/static/packages/bootstrap/css/docs.css" /> - - <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> - <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> - <![endif]--> - <link rel="stylesheet" type="text/css" href="/static/packages/colorbox/example4/colorbox.css" /> <link rel="stylesheet" type="text/css" href="/static/new/css/main.css" /> <link rel="stylesheet" type="text/css" href="/static/new/css/parsley.css" /> @@ -25,37 +20,6 @@ </head> -{% macro header(main, second) %} - <header class="jumbotron subhead" id="overview" > - <div class="container"> - <h1>{{ main }}</h1> - <p class="lead"> - {{ second }} - </p> - </div> - </header> - - {{ flash_me() }} -{% endmacro %} - - -{% macro flash_me() -%} - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - <div class="container"> - {% for category, message in messages %} - <div class="alert {{ category }}">{{ message }}</div> - {% endfor %} - </div> - {% endif %} - {% endwith %} -{% endmacro %} - -{% macro timeago(timestamp) %} -<time class="timeago" datetime="{{ timestamp }}">{{ timestamp }}</time> -{% endmacro %} - - <body style="width: 1500px !important;"> <!-- Navbar ================================================== --> diff --git a/wqflask/wqflask/templates/base_macro.html b/wqflask/wqflask/templates/base_macro.html new file mode 100644 index 00000000..c2905ebe --- /dev/null +++ b/wqflask/wqflask/templates/base_macro.html @@ -0,0 +1,28 @@ +{% macro flash_me() -%} + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + <div class="container"> + {% for category, message in messages %} + <div class="alert {{ category }}">{{ message }}</div> + {% endfor %} + </div> + {% endif %} + {% endwith %} +{% endmacro %} + +{% macro header(main, second) %} + <header class="jumbotron subhead" id="overview" > + <div class="container"> + <h1>{{ main }}</h1> + <p class="lead"> + {{ second }} + </p> + </div> + </header> + + {{ flash_me() }} +{% endmacro %} + +{% macro timeago(timestamp) %} +<time class="timeago" datetime="{{ timestamp }}">{{ timestamp }}</time> +{% endmacro %} diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html index 354723d0..f14c0921 100755 --- a/wqflask/wqflask/templates/collections/list.html +++ b/wqflask/wqflask/templates/collections/list.html @@ -15,6 +15,7 @@ <table class="table table-hover" id='trait_table'> <thead> <tr> + <th>Index</th> <th>Name</th> <th>Created</th> <th>Last Changed</th> @@ -25,6 +26,7 @@ <tbody> {% for uc in user_collections %} <tr class="collection_line"> + <td>{{ loop.index }} <td><a class="collection_name" href="{{ url_for('view_collection', uc_id=uc.id) }}">{{ uc.name }}</a></td> <td>{{ timeago(uc.created_timestamp.isoformat() + "Z") }}</td> <td>{{ timeago(uc.changed_timestamp.isoformat() + "Z") }}</td> diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index e41ade7c..053861ae 100755 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -67,7 +67,7 @@ <table class="table table-hover table-striped" id='trait_table'> <thead> <tr> - <th></th> + <th>Index</th> <th>Record</th> <th>Description</th> <th>Location</th> @@ -81,7 +81,7 @@ <tbody> {% for this_trait in trait_obs %} <TR id="trait:{{ this_trait.name }}:{{ this_trait.dataset.name }}"> - <TD> + <TD>{{ loop.index }} <INPUT TYPE="checkbox" NAME="searchResult" class="checkbox trait_checkbox" VALUE="{{ data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) }}"> </TD> diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index 169371be..445ad428 100755 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -85,13 +85,29 @@ <td>{{ trait.description }} <br><br> <b>Aliases</b>: {{ trait.alias }}</td> <td>Chr{{ trait.chr }}: {{'%0.6f'|format(trait.mb) if trait.mb != None }}</td> <td>{{'%0.3f'|format(trait.mean)}}</td> + {% if trait.lrs == "" or trait.lrs == 0.000 %} + <td>--</td> + {% else %} <td>{{'%0.3f'|format(trait.lrs)}}</td> - <td>Chr{{ trait.locus_chr }}: {{'%0.3f'|format(trait.locus_mb) }}</td> + {% endif %} + {% if trait.locus_mb == "" %} + <td>--</td> + {% else %} + <td>Chr{{ trait.locus_chr if trait.locus_chr != None }}: {{'%0.3f'|format(trait.locus_mb)}}</td> + {% endif %} <td><a target="_blank" href="corr_scatter_plot?dataset_1={{dataset.name}}&dataset_2={{trait.dataset.name}}&trait_1={{this_trait.name}}&trait_2={{trait.name}}">{{'%0.3f'|format(trait.sample_r)}}</a></td> <td>{{ trait.num_overlap }}</td> <td>{{'%0.3e'|format(trait.sample_p)}}</td> + {% if trait.lit_corr == "" or trait.lit_corr == 0.000 %} + <td>--</td> + {% else %} <td>{{'%0.3f'|format(trait.lit_corr)}}</td> + {% endif %} + {% if trait.tissue_corr == "" or trait.tissue_corr == 0.000 %} + <td>--</td> + {% else %} <td>{{'%0.3f'|format(trait.tissue_corr)}}</td> + {% endif %} <td>{{'%0.3e'|format(trait.tissue_pvalue)}}</td> {% elif target_dataset.type == "Publish" %} <td><a href="/show_trait?trait_id={{trait.name}}&dataset={{trait.dataset.name}}">{{ trait.name }}</a></td> diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index cb29a07c..3d5ddde4 100755 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -31,10 +31,10 @@ <label for="species" class="col-xs-1 control-label" style="width: 65px !important;">Species:</label> <div class="col-xs-10 controls input-append" style="padding-right: 0px;"> <div class="col-xs-8"> - <select name="species" id="species" class="form-control selectpicker span3" style="width: 280px !important;"></select> + <select name="species" id="species" class="form-control span3" style="width: 280px !important;"></select> </div> <div class="col-xs-4"> - <input id="make_default" class="btn btn-primary form-control" value="Make Default"> + <button type="button" id="make_default" class="btn btn-primary form-control">Make Default</button> </div> </div> </div> @@ -43,7 +43,7 @@ <label for="group" class="col-xs-1 control-label" style="width: 65px !important;">Group:</label> <div class="col-xs-10 controls input-append"> <div class="col-xs-8"> - <select name="group" id="group" class="form-control selectpicker span3" style="width: 280px !important;"></select> + <select name="group" id="group" class="form-control span3" style="width: 280px !important;"></select> <i class="icon-question-sign"></i> </div> </div> @@ -53,7 +53,7 @@ <label for="tissue" class="col-xs-1 control-label" style="width: 65px !important;">Type:</label> <div class="col-xs-10 controls"> <div class="col-xs-8"> - <select name="type" id="type" class="form-control selectpicker span3" style="width: 280px !important;"></select> + <select name="type" id="type" class="form-control span3" style="width: 280px !important;"></select> </div> </div> </div> @@ -62,7 +62,7 @@ <label for="dataset" class="col-xs-1 control-label" style="width: 65px !important;">Dataset:</label> <div class="col-xs-10 controls input-append"> <div class="col-xs-8"> - <select name="dataset" id="dataset" class="form-control selectpicker span5" style="width: 450px !important;"></select> + <select name="dataset" id="dataset" class="form-control span5" style="width: 450px !important;"></select> <i class="icon-question-sign"></i> </div> </div> @@ -76,10 +76,10 @@ <!-- GET ANY SEARCH --> <div class="form-group"> - <label for="tfor" class="col-xs-1 control-label" style="padding-left: 0px; padding-right: 0px; width: 65px !important;">Search for:</label> + <label for="or_search" class="col-xs-1 control-label" style="padding-left: 0px; padding-right: 0px; width: 65px !important;">Get Any:</label> <div class="col-xs-10 controls"> <div class="col-xs-8"> - <textarea name="search_terms" rows="2" class="form-control search-query" style="max-width: 550px; width: 450px !important;" id="tfor"></textarea> + <textarea name="search_terms_or" rows="1" class="form-control search-query" style="max-width: 550px; width: 450px !important;" id="or_search"></textarea> </div> </div> </div> @@ -87,19 +87,33 @@ <!-- GET ANY HELP --> <div class="form-group"> <label for="btsearch" class="col-xs-1 control-label" style="width: 65px !important;"></label> + <div class="col-xs-10 controls"> + <div class="col-xs-12 controls"> + 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>. + </div> + </div> + </div> + + <div class="form-group"> + <label for="and_search" class="col-xs-1 control-label" style="padding-left: 0px; padding-right: 0px; width: 65px !important;">Combined:</label> + <div class="col-xs-10 controls"> + <div class="col-xs-8"> + <textarea name="search_terms_and" rows="1" class="form-control search-query" style="max-width: 550px; width: 450px !important;" id="and_search"></textarea> + </div> + </div> + </div> + + <div class="form-group"> + <label for="btsearch" class="col-xs-1 control-label" style="width: 65px !important;"></label> <div class="col-xs-10 controls"> <div class="col-xs-2 controls" style="width: 100px !important;"> <input id="btsearch" type="submit" class="btn btn-primary form-control" value="Search"> </div> - <div class="col-xs-9 controls"> - Enter terms, genes, ID numbers in the <b>Search</b> field - Use <b>*</b> or <b>?</b> wildcards (Cyp*a?, synap*) - Use <b>quotes</b> for terms such as <i>"tyrosine kinase"</i> - </div> </div> </div> - <!-- SEARCH, MAKE DEFAULT --> <div class="form-group"> @@ -116,21 +130,15 @@ <h2>Advanced commands</h2> </div> - <p>GeneNetwork supports a variety of advanced searches.</p> - - <p>To try them out copy these examples into the search field:</p> + <p>You can also use advanced commands. Copy these simple examples into the Get Any or Combined search fields:</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>--> - - <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> + 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> @@ -146,12 +154,12 @@ <li><b>GO:0045202 LRS=(9 99 Chr4 122 155) cisLRS=(9 999 10)</b> finds synapse-associated genes with <a href="http://www.genenetwork.org/glossary.html#E" target="_blank"> cis eQTL</a> on Chr 4 from 122 and 155 Mb with LRS scores - between 9 and 999.</li> + between 9 and 999.</li>--> <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> </div> @@ -207,11 +215,8 @@ <ul> <li><a href="http://www.genenetwork.org/" target="_blank">Main GN1 site at UTHSC</a> (main site)</li> - <li><a href="http://www.genenetwork.waimr.uwa.edu.au/" target="_blank">Australia at the UWA</a></li> - <li><a href="http://gn.genetics.ucla.edu/" target="_blank">California at UCLA</a></li> <li><a href="http://genenetwork.helmholtz-hzi.de/" target="_blank">Germany at the HZI</a></li> <li><a href="http://genenetwork.memphis.edu/" target="_blank">Memphis at the U of M</a></li> - <li><a href="http://genenetwork.epfl.ch/" target="_blank">Switzerland at the EPFL</a></li> </ul> </section> diff --git a/wqflask/wqflask/templates/interval_mapping.html b/wqflask/wqflask/templates/interval_mapping.html deleted file mode 100755 index 82a96ba1..00000000 --- a/wqflask/wqflask/templates/interval_mapping.html +++ /dev/null @@ -1,116 +0,0 @@ -{% block css %} -<!-- <link rel="stylesheet" type="text/css" href="/static/new/css/interval_mapping.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" /> - <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" /> - <link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" /> -{% endblock %} -{% block content %} <!-- Start of body --> - - - <div id="mapping_results" class="container"> - <div> - <h2> - Whole Genome Mapping - </h2> - <form style ='float: left; padding: 5px;' id="exportform" action="export" method="post"> - <input type="hidden" id="data" name="data" value=""> - <input type="hidden" id="filename" name="filename" value=""> - <input type="submit" id="export" value="Download SVG"> - </form> - <form style ='float: left; padding: 5px;' id="exportpdfform" action="export_pdf" method="post"> - <input type="hidden" id="data" name="data" value=""> - <input type="hidden" id="filename" name="filename" value=""> - <input type="submit" id="export_pdf" value="Download PDF"> - </form> - </div> - <div id="chart_container"> - <div class="qtlcharts" id="topchart"> - - </div> - </div> - <div> - <h2> - Results - </h2> - </div> - <table cellpadding="0" cellspacing="0" border="0" id="qtl_results" class="table table-hover table-striped table-bordered"> - <thead> - <tr> - <td>Index</td> - <td>LRS Score</td> - <td>Chr</td> - <td>Mb</td> - <td>Locus</td> - <td>Additive Effect</td> - </tr> - </thead> - <tbody> - {% for marker in qtl_results %} - <tr> - <td>{{ loop.index }}</td> - <td>{{ marker.lrs_value|float }}</td> - <td>{{ marker.chr|int }}</td> - <td>{{ marker.Mb|float }}</td> - <td>{{ marker.name }}</td> - <td>{{ marker.additive|float }}</td> - </tr> - {% endfor %} - </tbody> - </table> - - </div> - - <!-- End of body --> - -{% endblock %} - -{% block js %} - <script> - js_data = {{ js_data | safe }} - </script> - - <!--[if lt IE 9]> -<!-- <script language="javascript" type="text/javascript" src="/static/packages/jqplot/excanvas.js"></script>--> - <![endif]--> - <script language="javascript" type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/js_external/d3-tip.min.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/javascript/panelutil.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/javascript/chr_interval_map.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/javascript/lod_chart.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/javascript/create_lodchart.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.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.scientific.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" src="/static/packages/underscore/underscore-min.js"></script> - - <script type="text/javascript" charset="utf-8"> - $(document).ready( function () { - console.time("Creating table"); - $('#qtl_results').dataTable( { - //"sDom": "<<'span3'l><'span3'T><'span4'f>'row-fluid'r>t<'row-fluid'<'span6'i><'span6'p>>", - "sDom": "lTftipr", - "oTableTools": { - "aButtons": [ - "copy", - "print", - { - "sExtends": "collection", - "sButtonText": 'Save <span class="caret" />', - "aButtons": [ "csv", "xls", "pdf" ] - } - ], - "sSwfPath": "/static/packages/TableTools/media/swf/copy_csv_xls_pdf.swf" - }, - "iDisplayLength": 50, - "bLengthChange": true, - "bDeferRender": true, - "bSortClasses": false - } ); - console.timeEnd("Creating table"); - }); - </script> -{% endblock %}
\ No newline at end of file diff --git a/wqflask/wqflask/templates/marker_regression.html b/wqflask/wqflask/templates/marker_regression.html index 6aed69d5..d8f64c20 100755 --- a/wqflask/wqflask/templates/marker_regression.html +++ b/wqflask/wqflask/templates/marker_regression.html @@ -1,15 +1,5 @@ -{% extends "base.html" %} -{% block title %}Interval Mapping{% endblock %} -{% block css %} -<!-- <link rel="stylesheet" type="text/css" href="/static/new/css/interval_mapping.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" /> - <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" /> - <link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" /> -{% endblock %} -{% block content %} <!-- Start of body --> - +{% from "base_macro.html" import header %} +{% block content %} {{ header("Mapping", '{}: {}'.format(this_trait.name, this_trait.description_fmt)) }} @@ -29,6 +19,7 @@ <input type="submit" id="export_pdf" value="Download PDF"> </form> <!-- <button id="export_pdf" class="btn">Export PDF</button>--> + <button id="return_to_full_view" class="btn" style="display:none">Return to full view</button> </div> <div id="chart_container"> <div class="qtlcharts" id="topchart"> @@ -75,28 +66,6 @@ js_data = {{ js_data | safe }} </script> - <!--[if lt IE 9]> -<!-- <script language="javascript" type="text/javascript" src="/static/packages/jqplot/excanvas.js"></script>--> - <![endif]--> - <script language="javascript" type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/js_external/d3-tip.min.js"></script> -<!-- <script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/jspdf.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/libs/FileSaver.js/FileSaver.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/libs/Blob.js/BlobBuilder.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/jspdf.plugin.standard_fonts_metrics.js"></script> - <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/javascript/panelutil.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/javascript/chr_lod_chart.js"></script> -<!-- <script language="javascript" type="text/javascript" src="/static/new/javascript/manhattan_plot.js"></script>--> - <script language="javascript" type="text/javascript" src="/static/new/javascript/lod_chart.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/javascript/create_lodchart.js"></script> - <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.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.scientific.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" src="/static/packages/underscore/underscore-min.js"></script> - <script type="text/javascript" charset="utf-8"> $(document).ready( function () { console.time("Creating table"); @@ -123,4 +92,4 @@ console.timeEnd("Creating table"); }); </script> -{% endblock %}
\ No newline at end of file +{% endblock %} diff --git a/wqflask/wqflask/templates/old_index_page.html b/wqflask/wqflask/templates/old_index_page.html deleted file mode 100755 index db0b2d9e..00000000 --- a/wqflask/wqflask/templates/old_index_page.html +++ /dev/null @@ -1,320 +0,0 @@ -{% extends "base.html" %} -{% block title %}GeneNetwork{% endblock %} -{% block content %} - <!-- Start of body --> - <tr> - <td bgcolor="#EEEEEE" class="solidBorder"> - <table width="100%" cellspacing="0" cellpadding="5"> - <tr> - <td valign="top" width="40%" align="left" height="10" bgcolor="#EEEEEE"> - <p style="font-size:18px;font-family:verdana;color:black"><b>Select and - Search</b></p> - - <form method="get" action="/search" class="form-search" name="SEARCHFORM"> - <table width="100%"> - <!-- SPECIES SELECTION --> - - <tr> - <td align="right" height="35" style= - "font-size:14px;font-family:verdana;color:black" width="16%"> - <b>Species:</b></td> - - <td width="3%"></td> - - <td nowrap width="85%" align="left"> - <div id="menu0"> - <select name="species" size="1" id="species" onchange= - "fillOptions('species');"> - </select> - </div> - </td> - </tr><!-- GROUP SELECTION --> - - <tr> - <td align="right" height="35" style= - "font-size:14px;font-family:verdana;color:black"><b>Group:</b></td> - - <td width="3%"></td> - - <td nowrap width="85%" align="left"> - <div id="menu1"> - <select name="cross" size="1" id="cross" onchange="fillOptions('cross');"> - </select> <input type="button" class="btn" value="Info" onclick= - "javascript:crossinfo();"> - </div> - </td> - </tr><!-- TYPE SELECTION --> - - <tr> - <td align="right" height="35" style= - "font-size:14px;font-family:verdana;color:black"><b>Type:</b></td> - - <td width="3%"></td> - - <td nowrap width="85%" align="left"> - <div id="menu2"> - <select name="tissue" size="1" id="tissue" onchange= - "fillOptions('tissue');"> - </select> - </div> - </td> - </tr><!-- DATABASE SELECTION --> - - <tr> - <td align="right" height="35" style= - "font-size:14px;font-family:verdana;color:black"><b>Database:</b></td> - - <td width="3%"></td> - - <td nowrap width="85%" align="left"> - <div id="menu3"> - <select name="database" size="1" id="database"> - </select> <input type="submit" class="btn" value="Info" name= - "info_database"> - </div> - </td> - </tr><!-- USER HELP --> - - <tr> - <td align="right" height="20" width="10%"></td> - - <td width="3%"></td> - - <td align="left" width="85%"> - <p class="fs12"> Databases marked with <b>**</b> - suffix are not public yet.<br> - Access requires <a href="/account.html" target= - "_blank" class="fs14"><small>user login</small></a>.</p> - </td> - </tr><!-- GET ANY SEARCH --> - - <tr> - <td align="right" height="35" nowrap="on" style= - "font-size:14px;font-family:verdana;color:black" width="10%"> - <b>Search:</b></td> - - <td width="3%"></td> - - <td nowrap width="85%" align="left"><input class="input-medium search-query" - id="tfor" name="search_terms" style= - "width:420px; background-color:white; font-family:verdana; font-size:14px" - type="text" maxlength="500"></td> - </tr><!-- GET ANY HELP --> - - <tr> - <td align="right" height="20" width="10%"></td> - - <td width="3%"></td> - - <td width="85%" align="left"> - <p class="fs12"> 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> - </td> - </tr><!-- SEARCH, MAKE DEFAULT, ADVANCED SEARCH --> - - <tr align="center"> - <td width="3%"></td> - - <td width="3%"></td> - - <td align="left" height="40" colspan="3"><input id="btsearch" type="submit" - class="btn btn-primary" value="Search"> <input type= - "button" class="btn" value="Make Default" onclick= - "setDefault(this.form);"> <input type="button" class= - "btn" value="Advanced Search" onclick= - "javascript:window.open('/index3.html', '_self');"></td> - </tr> - </table><input type="hidden" name="FormID" value="searchResult"> <input type= - "hidden" name="RISet" value="BXD"> <script src="/javascript/selectDatasetMenu.js" - type="text/javascript"> -</script> - </form><!-- QUICK HELP --> - - <p> ______________________________________________________</p> - - <p style="font-size:13px;font-family:verdana;color:black"><b> Quick HELP - Examples and</b> <a href="http://www.genenetwork.org/index4.html" target="_blank" - class="fs14"><b>User's Guide</b></a></p> You can also use advanced - commands. Copy these simple examples<br> - into the <b>Get Any</b> or <b>Combined</b> search fields: - - <ul style="font-size:12px;font-family:verdana;color:black"> - <li><b><i>POSITION=(chr1 25 30)</i></b> finds genes, markers, or transcripts on - chromosome 1 between 25 and 30 Mb.</li> - - <li><b><i>MEAN=(15 16) LRS=(23 46)</i></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" class= - "fs14"><small>LRS</small></a> linkage between 23 and 46.</li> - - <li><b><i>RIF=mitochondrial</i></b> searches RNA databases for <a href= - "http://www.ncbi.nlm.nih.gov/projects/GeneRIF/GeneRIFhelp.html" target="_blank" - class="fs14"><small>GeneRIF</small></a> links.</li> - - <li><b><i>WIKI=nicotine</i></b> searches <a href= - "http://www.genenetwork.org/webqtl/main.py?FormID=geneWiki" target="_blank" class= - "fs14"><small>GeneWiki</small></a> for genes that you or other users have annotated - with the word <i>nicotine</i>.</li> - - <li><b><i>GO:0045202</i></b> searches for synapse-associated genes listed in the - <a href="http://www.godatabase.org/cgi-bin/amigo/go.cgi" target="_blank" class= - "fs14"><small>Gene Ontology</small></a>.</li> - - <li><b><i>GO:0045202 LRS=(9 99 Chr4 122 155) cisLRS=(9 999 10)</i></b><br> - in <b>Combined</b> finds synapse-associated genes with <a href= - "http://www.genenetwork.org/glossary.html#E" target="_blank" class= - "fs14"><small>cis eQTL</small></a> on Chr 4 from 122 and 155 Mb with LRS scores - between 9 and 999.</li> - - <li><b><i>RIF=diabetes LRS=(9 999 Chr2 100 105) transLRS=(9 999 10)</i></b><br> - in <b>Combined</b> finds diabetes-associated transcripts with peak <a href= - "http://www.genenetwork.org/glossary.html#E" target="_blank" class= - "fs14"><small>trans eQTLs</small></a> on Chr 2 between 100 and 105 Mb with LRS - scores between 9 and 999.</li> - </ul> - </td><!-- END OF FIND SELECTOR PULL-DOWN PANEL (LEFT SIDE) --> - <!-- START OF TOP RIGHT PANEL --> - - <td valign="top" width="40%" bgcolor="#FFFFFF"> - <p style="font-size:15px;font-family:verdana;color:black"><b>Websites Affiliated with - GeneNetwork</b></p> - - <p style="font-size:12px;font-family:verdana;color:black"></p> - - <ul> - <li><a href="http://ucscbrowser.genenetwork.org/" target="_blank">Genome - Browser</a> at UTHSC</li> - - <li><a href="http://galaxy.genenetwork.org/" target="_blank">Galaxy</a> at - UTHSC</li> - - <li>GeneNetwork at <a href="http://ec2.genenetwork.org/" target="_blank">Amazon - Cloud (EC2)</a></li> - - <li>GeneNetwork Source Codes at <a href= - "http://sourceforge.net/projects/genenetwork/" target="_blank">SourceForge</a></li> - - <li>GeneNetwork Source Codes at <a href= - "https://github.com/genenetwork/genenetwork" target="_blank">GitHub</a></li> - </ul> - - <p>____________________________</p> - - <p style="font-size:15px;font-family:verdana;color:black"><b>Getting Started</b> - </p> - - <ol style="font-size:12px;font-family:verdana;color:black"> - <li>Select <b>Species</b> (or select All)</li> - - <li>Select <b>Group</b> (a specific sample)</li> - - <li>Select <b>Type</b> of data: - - <ul> - <li>Phenotype (traits)</li> - - <li>Genotype (markers)</li> - - <li>Expression (mRNAs)</li> - </ul> - </li> - - <li>Select a <b>Database</b></li> - - <li>Enter search terms in the <b>Get Any</b> or <b>Combined</b> field: words, - genes, ID numbers, probes, advanced search commands</li> - - <li>Click on the <b>Search</b> button</li> - - <li>Optional: Use the <b>Make Default</b> button to save your preferences</li> - </ol> - - <p>____________________________</p> - - <p style="font-size:14px;font-family:verdana;color:black"><b>How to Use - GeneNetwork</b></p> - - <blockquote> - <p style="font-size:12px;font-family:verdana;color:black">Take a 20-40 minute - GeneNetwork <a href="http://www.genenetwork.org/tutorial/WebQTLTour/" target= - "_blank" class="fs14"><small>Tour</small></a> that includes screen shots and - typical steps in the analysis.</p> - </blockquote> - - <blockquote> - <p style="font-size:12px;font-family:verdana;color:black">For information about - resources and methods, select the <img src= - "http://www.genenetwork.org/images/upload/Info.png" alt="INFO" border="0" valign= - "middle"> buttons.</p> - - <p style="font-size:12px;font-family:verdana;color:black">Try the <a href= - "http://alexandria.uthsc.edu/" target="_blank" class= - "fs14"><small>Workstation</small></a> site to explore data and features that are - being implemented.</p> - - <p style="font-size:12px;font-family:verdana;color:black">Review the <a href= - "/conditionsofUse.html" target="_blank" class="fs14"><small>Conditions</small></a> - and <a href="/statusandContact.html" target="_blank" class= - "fs14"><small>Contacts</small></a> pages for information on the status of data sets - and advice on their use and citation.</p> - </blockquote> - - <p style="font-size:14px;font-family:verdana;color:black"><b>Mirror and Development - Sites</b></p> - - <ul> - <li><a href="http://www.genenetwork.org/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">Main GN site at UTHSC</a> (main - site)</li> - - <li><a href="http://www.genenetwork.waimr.uwa.edu.au/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">Australia at the UWA</a></li> - - <li><a href="http://gn.genetics.ucla.edu/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">California at UCLA</a></li> - - <li><a href="http://genenetwork.helmholtz-hzi.de/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">Germany at the HZI</a></li> - - <li><a href="https://genenetwork.hubrecht.eu/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">Netherlands at the Hubrecht</a> - (Development)</li> - - <li><a href="http://genenetwork.memphis.edu/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">Memphis at the U of M</a></li> - - <li><a href="http://webqtl.bic.nus.edu.sg/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">Singapore at the NUS</a></li> - - <li><a href="http://genenetwork.epfl.ch/" target="_blank" style= - "font-size:12px;font-family:verdana;color:blue">Switzerland at the EPFL</a></li> - </ul> - - <p style="font-size:14px;font-family:verdana;color:black"><b>History and - Archive</b></p> - - <blockquote> - <p style="font-size:12px;font-family:verdana;color:black">GeneNetwork's <a href= - "http://artemis.uthsc.edu" target="_blank" class="fs14"><small>Time - Machine</small></a> links to earlier versions that correspond to specific - publication dates.</p> - </blockquote> - </td> - </tr> - </table> - </td> - </tr> - <!-- End of body --> - <script src="/javascript/searchtip.js" type="text/javascript"> - </script> - <script type="text/javascript"> - $(document).ready(function () { - initialDatasetSelection(); - }); - </script> -{% endblock %} - diff --git a/wqflask/wqflask/templates/search_error.html b/wqflask/wqflask/templates/search_error.html new file mode 100644 index 00000000..22416580 --- /dev/null +++ b/wqflask/wqflask/templates/search_error.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} +{% block title %}Search Results{% 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 --> + {{ header("Error") }} + + <div class="container"> + <input type="hidden" name="uc_id" id="uc_id" value="{{ uc_id }}"> + <p>You entered at least one incorrect search command.</p> + </div> + + <div id="myModal"></div> + +<!-- End of body --> + +{% endblock %} diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index c7c2a62f..7c39ac61 100755 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -63,7 +63,7 @@ <tbody> {% for this_trait in trait_list %} <TR id="trait:{{ this_trait.name }}:{{ this_trait.dataset.name }}"> - <TD> + <TD>{{ loop.index }} <INPUT TYPE="checkbox" NAME="searchResult" class="checkbox trait_checkbox" VALUE="{{ data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) }}"> </TD> @@ -82,7 +82,7 @@ <TD>{{ this_trait.mean }}</TD> <TD align="right">{{ this_trait.LRS_score_repr }}</TD> <TD>{{ this_trait.LRS_location_repr }}</TD> - <TD>{{ this_trait.additive }}</TD> + <TD>{{ '%0.3f' % this_trait.additive|float }}</TD> {% elif dataset.type == 'Publish' %} <TD>{{ this_trait.description_display }}</TD> <TD>{{ this_trait.authors }}</TD> @@ -93,7 +93,7 @@ </TD> <TD>{{ this_trait.LRS_score_repr }}</TD> <TD>{{ this_trait.LRS_location_repr }}</TD> - <TD>{{ this_trait.additive }}</TD> + <TD>{{ '%0.3f' % this_trait.additive|float }}</TD> {% elif dataset.type == 'Geno' %} <TD>{{ this_trait.location_repr }}</TD> {% endif %} @@ -119,22 +119,37 @@ <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 type="text/javascript" charset="utf-8"> + + console.log("TESTING:", parseFloat("TESTING")) + function getValue(x) { if (x.indexOf('input') >= 0) { if ($(x).val() == 'x') { - return 0 + return 0; } else { return parseFloat($(x).val()); } } + else if (isNaN(x)) { + return x; + } return parseFloat(x); } jQuery.fn.dataTableExt.oSort['cust-txt-asc'] = function (a, b) { var x = getValue(a); - var y = getValue(b); - return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + var y = getValue(b); + + if (x == 'N/A' || x == '') { + return 1; + } + else if (y == 'N/A' || y == '') { + return -1; + } + else { + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + } }; jQuery.fn.dataTableExt.oSort['cust-txt-desc'] = function (a, b) { @@ -164,21 +179,12 @@ "sWidth": "35%" }, { "sType": "natural", "sWidth": "15%" }, - { "sType": "cust-txt" }, + { "sType": "natural" }, { "sType": "natural", "sWidth": "12%" }, { "sType": "natural", - "sWidth": "15%" }, - { "sType": "cust-txt" } - ], - "columns": [ - { "width": "50%" }, - null, - null, - null, - null, - null, - null + "sWidth": "20%" }, + { "sType": "natural" } ], "sDom": "tir", "iDisplayLength": -1, @@ -187,7 +193,6 @@ "bDeferRender": true, "bSortClasses": false } ); - {% elif dataset.type == 'Publish' %} $('#trait_table').dataTable( { //"sDom": "<<'span3'l><'span3'T><'span4'f>'row-fluid'r>t<'row-fluid'<'span6'i><'span6'p>>", @@ -200,16 +205,8 @@ "sWidth": "20%" }, { "sType": "natural" }, { "sType": "cust-txt" }, - { "sType": "natural" } - ], - "columns": [ - { "width": "50%" }, - null, - null, - null, - null, - null, - null + { "sType": "natural" }, + { "sType": "cust-txt" } ], "sDom": "tir", "iDisplayLength": -1, diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html index d6f22f41..cdde5d9d 100755 --- a/wqflask/wqflask/templates/show_trait.html +++ b/wqflask/wqflask/templates/show_trait.html @@ -5,11 +5,15 @@ <link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" /> <link rel="stylesheet" type="text/css" href="/static/new/css/bar_chart.css" /> <link rel="stylesheet" type="text/css" href="/static/new/css/box_plot.css" /> + <link rel="stylesheet" type="text/css" href="/static/new/css/prob_plot.css" /> <link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" /> <link rel="stylesheet" type="text/css" href="/static/new/css/scatter-matrix.css" /> <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/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 --> @@ -24,6 +28,7 @@ <form method="post" action="/corr_compute" name="trait_page" id="trait_data_form" class="form-horizontal"> <div id="hidden_inputs"> + <input type="hidden" name="trait_hmac" value="{{ data_hmac('{}:{}'.format(this_trait.name, dataset.name)) }}"> {% for key in hddn %} <input type="hidden" name="{{ key }}" value="{{ hddn[key] }}"> {% endfor %} @@ -42,11 +47,9 @@ {% include 'show_trait_details.html' %} <div class="panel-group" id="accordion"> <div class="panel panel-default"> - <div class="panel-heading"> + <div class="panel-heading" data-toggle="collapse" data-parent="#accordion" data-target="#collapseOne"> <h3 class="panel-title"> - <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> - <span class="glyphicon glyphicon-chevron-down"></span> Statistics - </a> + <span class="glyphicon glyphicon-chevron-down"></span> Statistics </h3> </div> <div id="collapseOne" class="panel-collapse collapse in"> @@ -56,11 +59,9 @@ </div> </div> <div class="panel panel-default"> - <div class="panel-heading"> + <div class="panel-heading" data-toggle="collapse" data-parent="#accordion" data-target="#collapseTwo"> <h3 class="panel-title"> - <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"> - <span class="glyphicon glyphicon-chevron-down"></span> Calculate Correlations - </a> + <span class="glyphicon glyphicon-chevron-down"></span> Calculate Correlations </h3> </div> <div id="collapseTwo" class="panel-collapse collapse in"> @@ -70,11 +71,9 @@ </div> </div> <div class="panel panel-default"> - <div class="panel-heading"> + <div class="panel-heading" data-toggle="collapse" data-parent="#accordion" data-target="#collapseThree"> <h3 class="panel-title"> - <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree"> - <span class="glyphicon glyphicon-chevron-down"></span> Mapping Tools - </a> + <span class="glyphicon glyphicon-chevron-down"></span> Mapping Tools </h3> </div> <div id="collapseThree" class="panel-collapse collapse in"> @@ -84,11 +83,9 @@ </div> </div> <div class="panel panel-default"> - <div class="panel-heading"> + <div class="panel-heading" data-toggle="collapse" data-parent="#accordion" data-target="#collapseFour" aria-expanded="true"> <h3 class="panel-title"> - <a data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="true"> - <span class="glyphicon glyphicon-chevron-up"></span> Review and Edit Data - </a> + <span class="glyphicon glyphicon-chevron-up"></span> Review and Edit Data </h3> </div> <div id="collapseFour" class="panel-collapse collapse" aria-expanded="true"> @@ -114,9 +111,12 @@ </script> <script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> + <script type="text/javascript" src="/static/new/packages/nvd3/nv.d3.js"></script> <script type="text/javascript" src="/static/new/js_external/underscore-min.js"></script> <script type="text/javascript" src="/static/new/js_external/underscore.string.min.js"></script> <script type="text/javascript" src="/static/new/js_external/d3-tip.min.js"></script> + <script type="text/javascript" src="/static/new/js_external/jstat.min.js"></script> + <script type="text/javascript" src="/static/new/js_external/shapiro-wilk.js"></script> <script type="text/javascript" src="/static/new/javascript/colorbrewer.js"></script> <script type="text/javascript" src="/static/new/packages/ValidationPlugin/dist/jquery.validate.min.js"></script> <script type="text/javascript" src="/static/new/javascript/panelutil.js"></script> @@ -135,9 +135,16 @@ <script type="text/javascript" src="/static/new/javascript/show_trait.js"></script> <script type="text/javascript" src="/static/new/javascript/get_traits_from_collection.js"></script> <script type="text/javascript" src="/static/new/javascript/validation.js"></script> - - <script language="javascript" type="text/javascript" src="/static/packages/bootstrap/js/bootstrap.min.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/libs/FileSaver.js/FileSaver.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/libs/Blob.js/BlobBuilder.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/packages/jsPDF/jspdf.plugin.standard_fonts_metrics.js"></script> + <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/javascript/chr_lod_chart.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/javascript/create_lodchart.js"></script> + <script language="javascript" type="text/javascript" src="/static/new/javascript/lod_chart.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.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/packages/DT_bootstrap/DT_bootstrap.js"></script> <script language="javascript" type="text/javascript" src="/static/packages/TableTools/media/js/TableTools.min.js"></script> @@ -146,7 +153,7 @@ function getValue(x) { if (x.indexOf('input') >= 0) { if ($(x).val() == 'x') { - return 0 + return 'x' } else { return parseFloat($(x).val()); @@ -164,12 +171,21 @@ jQuery.fn.dataTableExt.oSort['cust-txt-desc'] = function (a, b) { var x = getValue(a); var y = getValue(b); - return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + + if (x == 'x') { + return 1; + } + else if (y == 'x') { + return -1; + } + else { + return ((x < y) ? 1 : ((x > y) ? -1 : 0)); + } }; $(document).ready( function () { - $('.panel-heading').find('a').click(function () { + $('.panel-heading').click(function () { if ($(this).hasClass('collapsed')){ $(this).find('.glyphicon-chevron-down').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up'); } @@ -241,7 +257,6 @@ "bDeferRender": true, "bSortClasses": false } ); - console.timeEnd("Creating table"); {% endif %} }); </script> diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html index e1780e42..108fcd92 100755 --- a/wqflask/wqflask/templates/show_trait_details.html +++ b/wqflask/wqflask/templates/show_trait_details.html @@ -29,42 +29,87 @@ <dt>BLAT Score</dt> <dd>{{ "%0.3f" | format(this_trait.probe_set_blat_score|float) }}</dd> {% endif %} + <dt>Resource Links</dt> + {% if this_trait.dataset.type == 'ProbeSet' %} + <dd> + {% if this_trait.symbol != None %} + <a href="http://bioinformatics-dev/Getd2g.pl?gene_list={{ this_trait.symbol }}" target="_blank" title="Related descriptive, genomic, clinical, functional and drug-therapy information"> + Genotation + </a> + + {% endif %} + {% if this_trait.geneid != None %} + <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids={{ this_trait.geneid }}" target="_blank" title="Info from NCBI Entrez Gene"> + Gene + </a> + + {% endif %} + {% if this_trait.omim != None %} + <a href="http://www.ncbi.nlm.nih.gov/omim/{{ this_trait.omim }}" target="_blank" title="Summary from On Mendelion Inheritance in Man"> + OMIM + </a> + + {% endif %} + {% if this_trait.genbankid != None %} + <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=Nucleotide&cmd=search&doptcmdl=DocSum&term={{ this_trait.genbankid }}" target="_blank" title="Find the original GenBank sequence used to design the probes"> + GenBank + </a> + + {% endif %} + </dd> + {% endif %} </dl> - -<!--<div class="btn-toolbar"> +<div style="margin-bottom:15px;" class="btn-toolbar"> <div class="btn-group"> - <button class="btn btn-primary" title="Add to collection"> + <a href="#redirect"> + <button type="button" id="add_to_collection" class="btn btn-primary" title="Add to collection"> <i class="icon-plus-sign icon-white"></i> Add </button> - - <button class="btn" title="Find similar expression data"> + </a> + {% if this_trait.dataset.type == 'ProbeSet' %} + {% if this_trait.symbol != None %} + <a href="#redirect" onclick="window.open('http://www.genenetwork.org/webqtl/main.py?cmd=sch&gene={{ this_trait.symbol }}&alias=1&species={{ species_name }}')"> + <button type="button" class="btn btn-default" title="Find similar expression data"> <i class="icon-search"></i> Find </button> - - <button class="btn" title="Check probe locations at UCSC"> + </a> + {% endif %} + {% if UCSC_BLAT_URL != "" %} + <a href="#redirect" onclick="window.open('{{ UCSC_BLAT_URL }}')"> + <button type="button" class="btn btn-default" title="Check probe locations at UCSC"> <i class="icon-ok"></i> Verify </button> - </div> - - <div class="btn-group"> - - <button class="btn" title="Write or review comments about this gene"> + </a> + {% endif %} + {% if this_trait.symbol != None %} + <a href="#redirect" onclick="window.open('http://genenetwork.org/webqtl/main.py?FormID=geneWiki&symbol={{ this_trait.symbol }}')"> + <button type="button" class="btn btn-default" title="Write or review comments about this gene"> <i class="icon-edit"></i> GeneWiki </button> - - <button class="btn" title="View SNPs and Indels"> + </a> + <a href="#redirect" onclick="window.open('http://genenetwork.org/webqtl/main.py?FormID=SnpBrowserResultPage&submitStatus=1&diffAlleles=True&customStrain=True&geneName={{ this_trait.symbol }}')"> + <button type="button" class="btn btn-default" title="View SNPs and Indels"> <i class="icon-road"></i> SNPs </button> - - <button class="btn" title="View probes, SNPs, and RNA-seq at UTHSC"> + </a> + {% endif %} + {% if UTHSC_BLAT_URL != "" %} + <a href="#redirect" onclick="window.open('{{ UTHSC_BLAT_URL }}')"> + <button type="button" class="btn btn-default" title="View probes, SNPs, and RNA-seq at UTHSC"> <i class="icon-eye-close"></i> RNA-seq </button> - - <button class="btn" title="Check sequence of probes"> + </a> + {% endif %} + {% if show_probes == "True" %} + <a href="#redirect" onclick="window.open('http://genenetwork.org/webqtl/main.py?FormID=showProbeInfo&database={{ this_trait.dataset.name }}&ProbeSetID={{ this_trait.name }}&CellID={{ this_trait.cellid }}&RISet={{ dataset.group.name }}&incparentsf1=ON')"> + <button type="button" class="btn btn-default" title="Check sequence of probes"> <i class="icon-list"></i> Probes </button> - + </a> + {% endif %} + {% endif %} </div> -</div>--> +</div> + diff --git a/wqflask/wqflask/templates/show_trait_edit_data.html b/wqflask/wqflask/templates/show_trait_edit_data.html index 12a6a48e..a02dc409 100755 --- a/wqflask/wqflask/templates/show_trait_edit_data.html +++ b/wqflask/wqflask/templates/show_trait_edit_data.html @@ -14,10 +14,10 @@ <input type="text" id="remove_samples_field"> <select id="block_group" size="1"> <option value="primary"> - {{ sample_group_types['primary_only'] }} + {{ sample_group_types['samples_primary'] }} </option> <option value="other"> - {{ sample_group_types['other_only'] }} + {{ sample_group_types['samples_other'] }} </option> </select> <input type="button" id="block_by_index" class="btn" value="Block"> @@ -44,11 +44,11 @@ {% endif %} <br> <div> - <input type="button" id="hide_no_value" class="btn" value="Hide No Value"> - <input type="button" id="block_outliers" class="btn" value="Block Outliers"> - <input type="button" id="reset" class="btn btn-inverse" value="Reset"> + <input type="button" id="hide_no_value" class="btn btn-default" value="Hide No Value"> + <input type="button" id="block_outliers" class="btn btn-default" value="Block Outliers"> + <input type="button" id="reset" class="btn btn-primary" value="Reset"> <span class="input-append"> - <input type="button" id="export" class="btn" value="Export"> + <input type="button" id="export" class="btn btn-default" value="Export"> <select id="export_format" class="select optional span2"> <option value="excel">Excel</option> <option value="csv">CSV</option> @@ -75,7 +75,7 @@ <div id="edit_sample_lists"> {% for sample_type in sample_groups %} - <div> + <div class="sample_group"> <h3>{{ sample_type.header }}</h3> <table cellpadding="0" cellspacing="0" border="0" class="table table-hover table-striped table-bordered" diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index bd1e6f1e..6f69bcfa 100755 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -1,20 +1,21 @@ <div> + {% if (use_pylmm_rqtl and dataset.group.species != "human") or use_plink_gemma %} <div class="col-xs-6"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-pills"> + {% if use_pylmm_rqtl and not use_plink_gemma and dataset.group.species != "human" %} <li class="active"> <a href="#pylmm" data-toggle="tab">pyLMM</a> </li> <li> <a href="#rqtl_geno" data-toggle="tab">rqtl</a> </li> - {% if dataset.group.species != 'human' %} <li> <a href="#interval_mapping" data-toggle="tab">Interval Mapping</a> </li> {% endif %} - {% if dataset.group.species == 'human' %} + {% if use_plink_gemma %} <li> <a href="#plink" data-toggle="tab">PLINK</a> </li> @@ -28,8 +29,8 @@ </ul> <div class="tab-content"> + {% if use_pylmm_rqtl and not use_plink_gemma and dataset.group.species != "human" %} <div class="tab-pane active" id="pylmm"> - <div style="padding: 20px" class="form-horizontal"> <div class="mapping_method_fields form-group"> <label for="mapping_permutations" class="col-xs-2 control-label">Permutations</label> @@ -66,7 +67,7 @@ </div> <div class="form-group"> <div style="padding-left:15px;" class="controls"> - <button id="pylmm_compute" class="btn submit_special btn-primary" data-url="/marker_regression" title="Compute Marker Regression"> + <button id="pylmm_compute" class="btn submit_special btn-primary" title="Compute Marker Regression"> <i class="icon-ok-circle icon-white"></i> Open Mapping Tool </button> </div> @@ -160,7 +161,6 @@ </div> </div> </div> - {% if dataset.group.species != 'human' %} <div class="tab-pane" id="interval_mapping"> <div style="padding: 20px" class="form-horizontal"> <div class="mapping_method_fields form-group"> @@ -214,7 +214,7 @@ </div> </div> {% endif %} - {% if dataset.group.species == 'human' %} + {% if use_plink_gemma %} <div class="tab-pane" id="plink"> <div style="padding: 20px" class="form-horizontal"> <div class="mapping_method_fields form-group"> @@ -272,4 +272,7 @@ <div id="mapping_result_holder_wrapper" style="display:none;"> <div id="mapping_result_holder"></div> </div> + {% else %} + Mapping options are disabled for data not matched with genotypes. + {% endif %} </div> diff --git a/wqflask/wqflask/templates/show_trait_progress_bar.html b/wqflask/wqflask/templates/show_trait_progress_bar.html index 99906338..f9a34070 100755 --- a/wqflask/wqflask/templates/show_trait_progress_bar.html +++ b/wqflask/wqflask/templates/show_trait_progress_bar.html @@ -32,17 +32,4 @@ </div> </div> </div> -</div> - -<!--<div id="static_progress_bar_container" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="progress_bar" aria-hidden="true"> - <div class="modal-header"> - <h3 id="progress_bar">Loading... (Estimated time ~10-15m)</h3> - </div> - <div class="modal-body"> - <div class="progress progress-striped active"> - <div id="marker_regression_progress" class="bar" style="width: 100%"></div> - </div> - <div id="time_remaining"> - </div> - </div> -</div>-->
\ No newline at end of file +</div>
\ No newline at end of file diff --git a/wqflask/wqflask/templates/show_trait_statistics_new.html b/wqflask/wqflask/templates/show_trait_statistics_new.html index f2ebbbef..4eb74e5a 100755 --- a/wqflask/wqflask/templates/show_trait_statistics_new.html +++ b/wqflask/wqflask/templates/show_trait_statistics_new.html @@ -32,7 +32,7 @@ </div> <div class="tab-pane" id="histogram_tab"> <div style="padding: 20px" class="form-horizontal"> - {% if sample_groups|length == 1 %} + {% if sample_groups|length != 1 %} <select class="histogram_samples_group"> {% for group, pretty_group in sample_group_types.items() %} <option value="{{ group }}">{{ pretty_group }}</option> @@ -47,7 +47,7 @@ </div> <div class="tab-pane" id="bar_chart_tab"> <div style="padding: 20px" class="form-horizontal"> - {% if sample_groups|length == 1 %} + {% if sample_groups|length != 1 %} <select class="bar_chart_samples_group"> {% for group, pretty_group in sample_group_types.items() %} <option value="{{ group }}">{{ pretty_group }}</option> @@ -79,32 +79,40 @@ </button> </div> </div> - <div class="row" style="height: 0px"> - <div id="bar_chart_legend" style="margin-left: 900px; margin-top:50px; positive: relative;"> + <div class="row" style="position:relative"> + <div id="bar_chart_legend" style="margin-left: 150px; margin-top:20px; position: absolute;"> <span id="legend-left"></span> - <span id="legend-colors"> - <!-- - <svg height="10" width="90"> - <rect x="0" width="15" height="10" style="fill: rgb(0, 0, 0);"></rect> - <rect x="15" width="15" height="10" style="fill: rgb(50, 0, 0);"></rect> - <rect x="30" width="15" height="10" style="fill: rgb(100, 0, 0);"></rect> - <rect x="45" width="15" height="10" style="fill: rgb(150, 0, 0);"></rect> - <rect x="60" width="15" height="10" style="fill: rgb(200, 0, 0);"></rect> - <rect x="75" width="15" height="10" style="fill: rgb(255, 0, 0);"></rect> - </svg> - --> - </span> + <span id="legend-colors"></span> <span id="legend-right"></span> </div> </div> <div style="margin-left: 20px; margin-right: 20px;" class="row" id="bar_chart_container"> - <div id="bar_chart" class="barchart"></div> + <svg></svg> </div> </div> <div class="tab-pane" id="probability_plot"> - <div id="probability_plot_container"> - <div id="prob_plot" class="qtlcharts"></div> + <div style="padding: 20px" class="form-horizontal"> + {% if sample_groups|length != 1 %} + <select class="prob_plot_samples_group"> + {% for group, pretty_group in sample_group_types.items() %} + <option value="{{ group }}">{{ pretty_group }}</option> + {% endfor %} + </select> + <br><br> + {% endif %} + + <div id="prob_plot_container"> + <div id="prob_plot_title"></div> + <svg></svg> + </div> + + <div> + More about <a href="http://en.wikipedia.org/wiki/Normal_probability_plot" target="_blank">Normal Probability Plots</a> and more + about interpreting these plots from the <a href="/glossary.html#normal_probability" target="_blank">glossary</a></td> + </div> + </div> + </div> <!-- <div class="tab-pane" id="box_plot_tab"> {% if sample_groups|length > 1 %} @@ -140,4 +148,4 @@ <div id="collections_holder"></div> </div> -</div>
\ No newline at end of file +</div> |