diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js | 156 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/index_page_orig.html | 285 |
2 files changed, 441 insertions, 0 deletions
diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js new file mode 100644 index 00000000..1fe4cf75 --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js @@ -0,0 +1,156 @@ +// Generated by CoffeeScript 1.8.0 +$(function() { + var apply_default, check_search_term, dataset_info, group_info, make_default, open_window, populate_dataset, populate_group, populate_species, populate_type, process_json, redo_dropdown; + process_json = function(data) { + window.jdata = data; + populate_species(); + return apply_default(); + }; + $.ajax('/static/new/javascript/dataset_menu_structure.json', { + dataType: 'json', + success: process_json + }); + populate_species = function() { + var species_list; + species_list = this.jdata.species; + redo_dropdown($('#species'), species_list); + return populate_group(); + }; + window.populate_species = populate_species; + populate_group = function() { + var group_list, species; + console.log("in populate group"); + species = $('#species').val(); + group_list = this.jdata.groups[species]; + redo_dropdown($('#group'), group_list); + return populate_type(); + }; + window.populate_group = populate_group; + populate_type = function() { + var group, species, type_list; + console.log("in populate type"); + species = $('#species').val(); + group = $('#group').val(); + type_list = this.jdata.types[species][group]; + redo_dropdown($('#type'), type_list); + return populate_dataset(); + }; + window.populate_type = populate_type; + populate_dataset = function() { + var dataset_list, group, species, type; + console.log("in populate dataset"); + species = $('#species').val(); + group = $('#group').val(); + type = $('#type').val(); + console.log("sgt:", species, group, type); + dataset_list = this.jdata.datasets[species][group][type]; + console.log("pop_dataset:", dataset_list); + return redo_dropdown($('#dataset'), dataset_list); + }; + window.populate_dataset = populate_dataset; + redo_dropdown = function(dropdown, items) { + var item, _i, _len, _results; + console.log("in redo:", dropdown, items); + dropdown.empty(); + _results = []; + for (_i = 0, _len = items.length; _i < _len; _i++) { + item = items[_i]; + if (item.length > 2){ + _results.push(dropdown.append($("<option data-id=\""+item[0]+"\" />").val(item[1]).text(item[2]))); + } else { + _results.push(dropdown.append($("<option />").val(item[0]).text(item[1]))); + } + } + return _results; + }; + $('#species').change((function(_this) { + return function() { + return populate_group(); + }; + })(this)); + $('#group').change((function(_this) { + return function() { + return populate_type(); + }; + })(this)); + $('#type').change((function(_this) { + return function() { + return populate_dataset(); + }; + })(this)); + open_window = function(url, name) { + var options; + options = "menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=1,directories=1,width=900"; + return open(url, name, options).focus(); + }; + group_info = function() { + var group, species, url; + species = $('#species').val(); + group = $('#group').val(); + url = "/" + species + "Cross.html#" + group; + return open_window(url, "Group Info"); + }; + $('#group_info').click(group_info); + dataset_info = function() { + var dataset, url; + accession_id = $('#dataset option:selected').data("id"); + url = "http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&GN_AccessionId=" + accession_id; + return open_window(url, "Dataset Info"); + }; + $('#dataset_info').click(dataset_info); + make_default = function() { + var holder, item, jholder, _i, _len, _ref; + alert("The current settings are now your default.") + holder = {}; + _ref = ['species', 'group', 'type', 'dataset']; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + item = _ref[_i]; + holder[item] = $("#" + item).val(); + } + jholder = JSON.stringify(holder); + return $.cookie('search_defaults', jholder, { + expires: 365 + }); + }; + apply_default = function() { + var defaults, item, populate_function, _i, _len, _ref, _results; + defaults = $.cookie('search_defaults'); + if (defaults) { + defaults = $.parseJSON(defaults); + } else { + defaults = { + species: "mouse", + group: "BXD", + type: "Hippocampus mRNA", + dataset: "HC_M2_0606_P" + }; + } + _ref = [['species', 'group'], ['group', 'type'], ['type', 'dataset'], ['dataset', null]]; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + item = _ref[_i]; + $("#" + item[0]).val(defaults[item[0]]); + if (item[1]) { + populate_function = "populate_" + item[1]; + console.log("Calling:", populate_function); + _results.push(window[populate_function]()); + } else { + _results.push(void 0); + } + } + return _results; + }; + check_search_term = function() { + var or_search_term, and_search_term; + or_search_term = $('#or_search').val(); + and_search_term = $('#and_search').val(); + console.log("or_search_term:", or_search_term); + console.log("and_search_term:", and_search_term); + if (or_search_term === "" && and_search_term === "") { + alert("Please enter one or more search terms or search equations."); + return false; + } + }; + $("#make_default").click(make_default); + return $("#btsearch").click(check_search_term); +}); diff --git a/wqflask/wqflask/templates/index_page_orig.html b/wqflask/wqflask/templates/index_page_orig.html new file mode 100755 index 00000000..9fba0e31 --- /dev/null +++ b/wqflask/wqflask/templates/index_page_orig.html @@ -0,0 +1,285 @@ +{% extends "base.html" %} +{% block title %}GeneNetwork{% endblock %} +{% block content %} +<!-- Start of body --> + +<!-- + <header class="jumbotron subhead" id="overview"> + <div class="container"> + <h1>GeneNetwork</h1> + <p class="lead">Open source bioinformatics for systems genetics</p> + </div> + </header> +--> + + <div class="container-fluid"> + + {{ flash_me() }} + + <div class="row" style="width: 1400px !important;"> + + <div class="col-xs-5"> + <section id="search"> + <div class="page-header"> + <h1>Select and search</h1> + </div> + <form method="get" action="/search" name="SEARCHFORM"> + <fieldset> + <div style="padding: 20px" class="form-horizontal"> + + <div class="form-group"> + <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 span3" style="width: 280px !important;"></select> + </div> + <div class="col-xs-4"> + <button type="button" id="make_default" class="btn btn-primary form-control">Make Default</button> + </div> + </div> + </div> + + <div class="form-group"> + <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 span3" style="width: 280px !important;"></select> + <i class="icon-question-sign"></i> + </div> + </div> + </div> + + <div class="form-group"> + <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 span3" style="width: 280px !important;"></select> + </div> + </div> + </div> + + <div class="form-group"> + <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-10"> + <select name="dataset" id="dataset" class="form-control span5" style="width: 340px !important;"></select> + <i class="icon-question-sign"></i> + </div> + <div class="col-xs-2"> + <button type="button" id="dataset_info" class="btn btn-primary form-control" style="width: 75px !important;">Info</button> + </div> + </div> + </div> + + <!-- USER HELP --> + <!--<p >Databases marked with <b>**</b>--> + <!-- suffix are not public yet.<br>--> + <!-- Access requires <a href="/account.html" target=--> + <!-- "_blank" class="fs14">user login</a>.</p>--> + <!-- GET ANY SEARCH --> + + <div class="form-group"> + <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 onkeydown="pressed(event)" 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> + + <!-- 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 onkeydown="pressed(event)" 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> + </div> + + <!-- SEARCH, MAKE DEFAULT --> + + <div class="form-group"> + </div> + + <input type="hidden" name="FormID" value="searchResult" class="form-control"> + <!--!<input type="hidden" name="RISet" value="BXD">--> + </div> + </fieldset> + </form> + </section> + <section id="advanced"> + <div class="page-header"> + <h2>Advanced commands</h2> + </div> + + <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 + 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>RIF=mitochondrial</b> searches RNA databases for <a href="https://en.wikipedia.org/wiki/GeneRIF" target="_blank"> + GeneRIF</a> links.</li> + + <li><b>WIKI=nicotine</b> searches <a href="http://www.genenetwork.org/webqtl/main.py?FormID=geneWiki" target="_blank"> + 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 + <a href="http://www.godatabase.org/cgi-bin/amigo/go.cgi" target="_blank"> + Gene Ontology</a>.</li> + + <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> + + <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> + </ul> + </section> + </div> + <div style="padding-left:120px" class="col-xs-4" style="width: 600px !important;"> + <!-- + <section id="tour-info"> + <div class="page-header"> + <h1>Tour and more info</h1> + </div> + + <h3>Thirty minute tour</h3> + <p> + Take the 30 minute + GeneNetwork <a href="http://www.genenetwork.org/tutorial/WebQTLTour/" target="_blank" class="fs14">tour</a> that includes screen shots and + typical steps in the analysis. + </p> + + <h3>Even more info</h3> + <p> + For information about + resources and methods, select the Info buttons next to the Group + and Database fields above. + </p> + + <p>The <a href="/conditionsofUse.html" target="_blank">conditions</a> + and <a href="/statusandContact.html" target="_blank">contact + </a> pages have information on the status of data sets + and advice on their use and citation.</p> + + </section> + --> + + <section id="websites"> + <div class="page-header"> + <h1>Affiliates and mirrors</h1> + </div> + <h3>Websites affiliated with GeneNetwork</h3> + <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 1 at <a href="http://ec2.genenetwork.org/" target="_blank">Amazon + Cloud (EC2)</a></li> + + <li>GeneNetwork 1 Source Code at <a href="http://sourceforge.net/projects/genenetwork/" target="_blank">SourceForge</a></li> + + <li>GeneNetwork 2 Source Code at <a href="https://github.com/genenetwork/genenetwork2" target="_blank">GitHub</a></li> + </ul> + <h3>GN1 Mirror and development sites</h3> + + <ul> + <li><a href="http://www.genenetwork.org/" target="_blank">Main GN1 site at UTHSC</a> (main site)</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> + </ul> + </section> + + <!--<section id="getting-started"> + <div class="page-header"> + <h1>Getting started</h1> + </div> + + <ol style="font-size:12px;font-family:verdana;color:black"> + <li>Select <b>Species</b> (or 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>Dataset</b></li> + + <li>Enter terms in the search field: words, + genes, ID numbers, probes, advanced search commands</li> + + <li>Click the <b>Search</b> button</li> + + <li>Optional: Use the <b>Make Default</b> button to save your preferences</li> + </ol> + + <h3>User Guide</h3> + <h5>Read the + <a href="http://www.genenetwork.org/index4.html" target="_blank"> + user guide</a>.</h5> + + </section>--> + </div> + </div> + </div> + +{%endblock%} + +{% block js %} + <script src="/static/new/javascript/dataset_select_menu_orig.js"></script> + + <script> + function pressed(e) { + // Has the enter key been pressed? + if ( (window.event ? event.keyCode : e.which) == 13) { + // If enter key has been pressed and the search fields are non-empty + // manually submit the <form> + if( event.target.value.trim() != "" ) { + document.forms[1].submit(); + } + } + } + </script> + +{% endblock %} |