From 88022d6c26b320cb614454b706fad26fcd34033e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 31 May 2012 17:10:28 -0500 Subject: On branch develop Changes to be committed: modified: web/javascript/jqueryFunction.js modified: web/webqtl/correlation/CorrelationPage.py modified: web/webqtl/showTrait/DataEditingPage.py --- web/javascript/jqueryFunction.js | 2041 +++++++++++++++++++------------------- 1 file changed, 1009 insertions(+), 1032 deletions(-) mode change 100644 => 100755 web/javascript/jqueryFunction.js (limited to 'web/javascript') diff --git a/web/javascript/jqueryFunction.js b/web/javascript/jqueryFunction.js old mode 100644 new mode 100755 index 5e6641cd..e612098b --- a/web/javascript/jqueryFunction.js +++ b/web/javascript/jqueryFunction.js @@ -1,80 +1,75 @@ /* jquery part */ - /* used by index (base/indexBody.py) */ - -$(document).ready(function(){ +$(document).ready(function () { options_visible = 0; //Whether advanced options are being shown - $('tr .advanced_option').hide(); - $('.toggle_advanced').click(function(){ + $('.toggle_advanced').click(function () { $('tr .advanced_option').toggle(); - - if (options_visible = 0) { - $('.full_search_td').css('display','none;'); - $('.search_td').css('display','inline'); - options_visible = 1; - } - else { - if ($('#type_menu.type_menu').val() = 'Hippocampus'){ - $('.search_td').css('display','none;'); - $('.full_search_td').css('display','inline'); - } - options_visible = 0; - } + + if (options_visible = 0) { + $('.full_search_td').css('display', 'none;'); + $('.search_td').css('display', 'inline'); + options_visible = 1; + } else { + if ($('#type_menu.type_menu').val() = 'Hippocampus') { + $('.search_td').css('display', 'none;'); + $('.full_search_td').css('display', 'inline'); + } + options_visible = 0; + } }); - $('#full_search').click(function(){ + $('#full_search').click(function () { gene_symbol = $('input[name=keyword]').val(); scriptable_interface_url = 'http://alexandria.uthsc.edu:89/webqtl/main.py?cmd=sch&gene=' + gene_symbol; - window.open(scriptable_interface_url,'_self'); + window.open(scriptable_interface_url, '_self'); }); }); -$('select.type_menu').live('change', function() { +$('select.type_menu').live('change', function () { var trait_type = $('select.type_menu option:selected').val(); - $('#tissue').val(trait_type); - $('#tissue').trigger('change'); + $('#tissue').val(trait_type); + $('#tissue').trigger('change'); }); /* used by CorrelationPage.py, AddToSelectionPage.py, and SearchResultPage.py */ -$(document).ready(function(){ - $('img[name=addselect], img[name=networkgraph], img[name=corrmatrix], img[name=partialCorr], img[name=comparecorr], img[name=mintmap], img[name=heatmap]').click(function(){ - if ($('input[name=searchResult]:checked').length < 1){ - for (i=0; i<10; i++){ - $('input[name=searchResult]:eq('+i+')').attr('checked',true); +$(document).ready(function () { + $('img[name=addselect], img[name=networkgraph], img[name=corrmatrix], img[name=partialCorr], img[name=comparecorr], img[name=mintmap], img[name=heatmap]').click(function () { + if ($('input[name=searchResult]:checked').length < 1) { + for (i = 0; i < 10; i++) { + $('input[name=searchResult]:eq(' + i + ')').attr('checked', true); } } }); - $('img[name=addselect]').click(function(){ - addRmvSelection($('input[name=RISet]').val(), document.getElementsByName('showDatabase'+ $('input[name=RISet]').val())[0], 'addToSelection'); + $('img[name=addselect]').click(function () { + addRmvSelection($('input[name=RISet]').val(), document.getElementsByName('showDatabase' + $('input[name=RISet]').val())[0], 'addToSelection'); }); - $('.toggleShowHide').click(function(){ + $('.toggleShowHide').click(function () { var className = '.extra_options'; - if ($(className).css('display') == 'none'){ - var less = 'less'; - $('input[name=showHideOptions]').val(less); + if ($(className).css('display') == 'none') { + var less = 'less'; + $('input[name=showHideOptions]').val(less); $(className).show(); $('input[name=options]').val('Fewer Options'); var display = $('input[name=options]').css('display') - $(display).val('block'); - } - else { - var more = 'more'; - $('input[name=showHideOptions]').val(more); - $(className).hide(); - $('input[name=options]').val('More Options'); - var display = $('input[name=showHideOptions]').css('display') - $(display).val('block'); + $(display).val('block'); + } else { + var more = 'more'; + $('input[name=showHideOptions]').val(more); + $(className).hide(); + $('input[name=options]').val('More Options'); + var display = $('input[name=showHideOptions]').css('display') + $(display).val('block'); } }); }); @@ -83,82 +78,91 @@ $(document).ready(function(){ used by AddToSelectionPage.py */ function validateTraitNumber() { - var checkBoxes = $('.checkallbox'); - if (checkBoxes.filter(":checked").length < 2) { - alert("Please select at least two traits."); - return false; - } - else { - return true; - } + var checkBoxes = $('.checkallbox'); + if (checkBoxes.filter(":checked").length < 2) { + alert("Please select at least two traits."); + return false; + } else { + return true; + } } /* used by TextSearchPage.py */ -$(document).ready(function(){ - - $('.add_traits').click(function(){ - $('input[name=searchResult]').each(function(){ - if ($(this).is(':checked')){ - groupName = $(this).parents().next().next().children('[href]').text(); - addORrmv = 'addToSelection'; - thisForm = $('form[name=showDatabase]'); - addRmvSelection_allGroups(groupName, thisForm, addORrmv); - } - }); - }); - - function addRmvSelection_allGroups(groupName, thisForm, addORrmv){ - thisForm.attr('target',groupName); - thisForm.children('input[name=FormID]:hidden').val(addORrmv); - thisForm.children('input[name=RISet]:hidden').val(groupName); - var newWindow = open("",thisForm.attr('target'),"menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=1,directories=1,width=900"); - thisForm.submit(); - } - - $('.tab_content').hide(); //Hide all tab content - $('div.tab_container').each(function(){ - $(this).parent('td').find('div.tab_container:first').find('div.tab_content:first').show(); - }); - $('ul.tabs').each(function(){ - $(this).find('li:first').addClass('active'); - }); - $('ul.tabs:first').find('li:first').show(); - $('.tab_container:first').find('.tab_content:first').show(); - - //On Click Event - $('ul.tabs li').click(function() { - $('ul.tabs').find('li').removeClass('last_viewed'); - if($(this).parent('ul.tabs').next('div.tab_container').attr('id').indexOf('stats') != 1){ - $(this).addClass('last_viewed'); - } - $(this).parent('ul.tabs').find('li').removeClass('active'); - $(this).addClass('active'); - $(this).parent('ul.tabs').next('div.tab_container').find('.tab_content').hide(); - var activeTab = $(this).find('a').attr('href'); - if ($.browser.msie) - {$(activeTab).show();} - else - {$(activeTab).fadeIn();} //Fade in the active ID content - - return false; - }); +$(document).ready(function () { + + $('.add_traits').click(function () { + $('input[name=searchResult]').each(function () { + if ($(this).is(':checked')) { + groupName = $(this).parents().next().next().children('[href]').text(); + addORrmv = 'addToSelection'; + thisForm = $('form[name=showDatabase]'); + addRmvSelection_allGroups(groupName, thisForm, addORrmv); + } + }); + }); + + function addRmvSelection_allGroups(groupName, thisForm, addORrmv) { + thisForm.attr('target', groupName); + thisForm.children('input[name=FormID]:hidden').val(addORrmv); + thisForm.children('input[name=RISet]:hidden').val(groupName); + var newWindow = open("", thisForm.attr('target'), "menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=1,directories=1,width=900"); + thisForm.submit(); + } + + $('.tab_content').hide(); //Hide all tab content + $('div.tab_container').each(function () { + $(this).parent('td').find('div.tab_container:first').find('div.tab_content:first').show(); + }); + $('ul.tabs').each(function () { + $(this).find('li:first').addClass('active'); + }); + $('ul.tabs:first').find('li:first').show(); + $('.tab_container:first').find('.tab_content:first').show(); + + //On Click Event + $('ul.tabs li').click(function () { + $('ul.tabs').find('li').removeClass('last_viewed'); + if ($(this).parent('ul.tabs').next('div.tab_container').attr('id').indexOf('stats') != 1) { + $(this).addClass('last_viewed'); + } + $(this).parent('ul.tabs').find('li').removeClass('active'); + $(this).addClass('active'); + $(this).parent('ul.tabs').next('div.tab_container').find('.tab_content').hide(); + var activeTab = $(this).find('a').attr('href'); + if ($.browser.msie) { + $(activeTab).show(); + } else { + $(activeTab).fadeIn(); + } //Fade in the active ID content + return false; + }); }); /* used by DataEditingPage.py */ -$(document).ready(function() { +$(document).ready(function () { + + // ZS: This checks the number of columns in order to determine which column to not sort; in this case the plus-minus symbol shouldn't be sortable + $('#sortable1,#sortable2').find('th').each(function () { + if ($(this).text() == 'SE') { + $.tablesorter.defaults.headers = { + 3: { + sorter: false + } + }; + return false; + } + }); + + if ($('#sortable1,#sortable2').find('.outlier').size() > 0) { + $('input[name=sample_method]:eq(1)').attr('checked','checked'); + $('input[name=tissue_method]:eq(1)').attr('checked','checked'); + } - // ZS: This checks the number of columns in order to determine which column to not sort; in this case the plus-minus symbol shouldn't be sortable - $('#sortable1,#sortable2').find('th').each(function() { - if ($(this).text() == 'SE'){ - $.tablesorter.defaults.headers = { 3: {sorter: false} }; - return false; - } - }); /* ZS: This segment is called by tablesorter.js; it determines where to get the text used when sorting, based on the type of cell. @@ -167,949 +171,922 @@ $(document).ready(function() { This segment is repeated twice. Ideally this wouldn't be the case, but I can't find a way to reuse the inner textExtraction function. */ - //ZS: Defining these here, so they don't need to be searched for in the DOM for every single node - primaryTable = $("#sortable1"); - otherTable = $("#sortable2"); - - primaryValueHeader = primaryTable.find('th:contains("Value"):eq(0)'); - primarySEHeader = primaryTable.find('th:contains("SE"):eq(0)'); - otherValueHeader = otherTable.find('th:contains("Value"):eq(1)'); - otherSEHeader = otherTable.find('th:contains("SE"):eq(1)'); - - $("#sortable1").tablesorter({ - textExtraction: function(node) { - if ((node.children[0] == "[object HTMLInputElement]" && node.children[0].type == "text") || (/\S/.test(node.id))) { - cellId = node.id; - thisCell = $('#'+cellId).children(':eq(0)') - valueClassNames = thisCell.attr('class').split(/\s+/); - capitalized_column_name = cellId.split('_')[0].charAt(0).toUpperCase() + cellId.split('_')[0].slice(1); - value = valueClassNames[valueClassNames.length - 1]; - newValue = thisCell.val(); - - if (newValue == 'x' || value == '9999' || value == '-9999') { - valueType = cellId.split('_')[0]; - if (valueType == 'value'){ - header = primaryValueHeader; - } else { - header = primarySEHeader; - } - - if (header.hasClass('headerSortUp')){ - sort_order = 'desc'; - } else if (header.hasClass('headerSortDown')){ - sort_order = 'asc'; - } else { - sort_order = 'desc'; - } - - if (sort_order == 'desc') { - value = 9999; - thisCell.removeClass(value).addClass('9999'); - } else if (sort_order == 'asc'){ - value = -9999; - thisCell.removeClass(value).addClass('-9999'); - } else { - value = 9999; - thisCell.removeClass(value).addClass('9999'); - } - } - - text = value; - } - - else { - if (node.textContent) { - text = node.textContent; - } else { - if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { - text = node.childNodes[0].innerHTML; - } else { - text = node.innerText; - } - } - } - return text - } - }); - - $("#sortable2").tablesorter({ - textExtraction: function(node) { - if ((node.children[0] == "[object HTMLInputElement]" && node.children[0].type == "text") || (/\S/.test(node.id))) { - cellId = node.id; - thisCell = $('#'+cellId).children(':eq(0)') - valueClassNames = thisCell.attr('class').split(/\s+/); - capitalized_column_name = cellId.split('_')[0].charAt(0).toUpperCase() + cellId.split('_')[0].slice(1); - value = valueClassNames[valueClassNames.length - 1]; - newValue = thisCell.val(); - - if (newValue == 'x' || value == '9999' || value == '-9999') { - valueType = cellId.split('_')[0]; - if (valueType == 'value'){ - header = otherValueHeader; - } else { - header = otherSEHeader; - } - - if (header.hasClass('headerSortUp')){ - sort_order = 'desc'; - } else if (header.hasClass('headerSortDown')){ - sort_order = 'asc'; - } else { - sort_order = 'desc'; - } - - if (sort_order == 'desc') { - value = 9999; - thisCell.removeClass(value).addClass('9999'); - } else if (sort_order == 'asc'){ - value = -9999; - thisCell.removeClass(value).addClass('-9999'); - } else { - value = 9999; - thisCell.removeClass(value).addClass('9999'); - } - } - - text = value; - } - - else { - if (node.textContent) { - text = node.textContent; - } else { - if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { - text = node.childNodes[0].innerHTML; - } else { - text = node.innerText; - } - } - } - return text - } - }); + //ZS: Defining these here, so they don't need to be searched for in the DOM for every single node + primaryTable = $("#sortable1"); + otherTable = $("#sortable2"); + + primaryValueHeader = primaryTable.find('th:contains("Value"):eq(0)'); + primarySEHeader = primaryTable.find('th:contains("SE"):eq(0)'); + otherValueHeader = otherTable.find('th:contains("Value"):eq(1)'); + otherSEHeader = otherTable.find('th:contains("SE"):eq(1)'); + + $("#sortable1").tablesorter({ + textExtraction: function (node) { + if ((node.children[0] == "[object HTMLInputElement]" && node.children[0].type == "text") || (/\S/.test(node.id))) { + cellId = node.id; + thisCell = $('#' + cellId).children(':eq(0)') + valueClassNames = thisCell.attr('class').split(/\s+/); + capitalized_column_name = cellId.split('_')[0].charAt(0).toUpperCase() + cellId.split('_')[0].slice(1); + value = valueClassNames[valueClassNames.length - 1]; + newValue = thisCell.val(); + + if (newValue == 'x' || value == '9999' || value == '-9999') { + valueType = cellId.split('_')[0]; + if (valueType == 'value') { + header = primaryValueHeader; + } else { + header = primarySEHeader; + } + + if (header.hasClass('headerSortUp')) { + sort_order = 'desc'; + } else if (header.hasClass('headerSortDown')) { + sort_order = 'asc'; + } else { + sort_order = 'desc'; + } + + if (sort_order == 'desc') { + value = 9999; + thisCell.removeClass(value).addClass('9999'); + } else if (sort_order == 'asc') { + value = -9999; + thisCell.removeClass(value).addClass('-9999'); + } else { + value = 9999; + thisCell.removeClass(value).addClass('9999'); + } + } -/* + text = value; + } else { + if (node.textContent) { + text = node.textContent; + } else { + if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { + text = node.childNodes[0].innerHTML; + } else { + text = node.innerText; + } + } + } + return text + } + }); + + $("#sortable2").tablesorter({ + textExtraction: function (node) { + if ((node.children[0] == "[object HTMLInputElement]" && node.children[0].type == "text") || (/\S/.test(node.id))) { + cellId = node.id; + thisCell = $('#' + cellId).children(':eq(0)') + valueClassNames = thisCell.attr('class').split(/\s+/); + capitalized_column_name = cellId.split('_')[0].charAt(0).toUpperCase() + cellId.split('_')[0].slice(1); + value = valueClassNames[valueClassNames.length - 1]; + newValue = thisCell.val(); + + if (newValue == 'x' || value == '9999' || value == '-9999') { + valueType = cellId.split('_')[0]; + if (valueType == 'value') { + header = otherValueHeader; + } else { + header = otherSEHeader; + } + + if (header.hasClass('headerSortUp')) { + sort_order = 'desc'; + } else if (header.hasClass('headerSortDown')) { + sort_order = 'asc'; + } else { + sort_order = 'desc'; + } + + if (sort_order == 'desc') { + value = 9999; + thisCell.removeClass(value).addClass('9999'); + } else if (sort_order == 'asc') { + value = -9999; + thisCell.removeClass(value).addClass('-9999'); + } else { + value = 9999; + thisCell.removeClass(value).addClass('9999'); + } + } + + text = value; + } else { + if (node.textContent) { + text = node.textContent; + } else { + if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { + text = node.childNodes[0].innerHTML; + } else { + text = node.innerText; + } + } + } + return text + } + }); + + /* ZS: When the user changes the value in the text field, the new value is added as a class. This is because $('input[type=text]').val() gets the value attribute, which is always the default value, instead of the value property (which can be changed) */ - var thisTable = $('#sortable1,#sortable2'); - - thisTable.bind("update propertychange keyup input paste", function(e){ - - var target = e.target; - $target = $(target); - - if (target.nodeName.toLowerCase() == 'input'){ - thisClassNames = $target.attr('class').split(/\s+/); - valueClass = thisClassNames[thisClassNames.length - 1]; - newValue = $target.val(); - thisParent = $target.parent('td'); - thisParentId = thisParent.attr('id'); - - $target.removeClass(valueClass); - - if (newValue == 'x'){ - thisParent.parent('tr').addClass('blocked'); - } else { - $('#'+thisParentId).children('input.valueField:eq(0)').addClass(newValue); - } - } - }); - - //////////////////////////////////// - // Initially close tabs - //////////////////////////////////// - - thisForm = $('form[name="dataInput"]'); - - $('#sectionbody2').hide(); - $('#sectionbody3').hide(); - $('#sectionbody4').hide(); - - $('#title1').click(function() { - $('#sectionbody1').toggle(); - return false; - }); - $('#title2').click(function() { - $('#sectionbody2').toggle(); - return false; - }); - $('#title3').click(function() { - $('#sectionbody3').toggle(); - return false; - }); - $('#title4').click(function() { - $('#sectionbody4').toggle(); - return false; - }); - $('#title5').click(function() { - $('#sectionbody5').toggle(); - return false; - }); - - - - ////////////////////////////////////////////////////////////// - // Switch out + and - icon when you click each section header - ////////////////////////////////////////////////////////////// - - var expand_html = "  \"Expand\""; - var contract_html = "  \"Contract\""; - - $('#title2, #title3, #title4').prepend(expand_html).addClass('1'); - - $('#title1, #title5').prepend(contract_html).addClass('0'); - - for(i=1;i<=5;i++){ - $('#title'+i).click(function(){ - if ($(this).hasClass('0')) { - $(this).find('span').replaceWith(expand_html); - $(this).removeClass('0'); - $(this).addClass('1'); - } - else { - $(this).find('span').replaceWith(contract_html); - $(this).removeClass('1'); - $(this).addClass('0'); - } - }); - } - - // Exclude cases by attributes - - $('div.attribute_values:first').css('display', 'inline'); //Display the dropdown menu with the first attribute's distinct values - - $('select[name=exclude_menu]').change(function(){ - $('div.attribute_values').css('display', 'none'); //clear all other menus when a new attribute is selected - attribute = $(this).val(); - //attribute = $('select[name=exclude_menu]').val(); - menu = $('div.attribute_values').find('[name=\''+attribute+'\']'); - menu.parent().css('display', 'inline'); - }); - - primary_row_count = $('#primary').find('tr').length - 1; - other_row_count = $('#other').find('tr').length - 1; - - if (primary_row_count >= other_row_count) { - row_count = primary_row_count; - } - else { - row_count = other_row_count; - } - - $('div.attribute_values').children('select').change(function(){ - exclude_value = $(this).val(); - }); -}); - -$(window).load(function(){ - - //ZS: These are needed in a few places; looping through rows by index is faster than doing a "find" search - numPrimaryRows = $('#sortable1').find('tr').length; - numOtherRows = $('#sortable2').find('tr').length; - - -/////////////////////////////// -//Basic Statistics -/////////////////////////////// - - ///////////////////////////////////////////////////////////////// - // Hide unselected Basic Statistics tabs (when just BXD strains - // are selected, hide the results for all strains/non-BXD) - ///////////////////////////////////////////////////////////////// - - $('#stats_tabs1').hide(); - $('#stats_tabs2').hide(); - - $('#sectionbody2').find('select[name=stats_mdp]').change(function(){ - selected = $('#sectionbody2').find('select[name=stats_mdp] option:selected').val(); - for (i=0;i<=2;i++){ - $('#stats_tabs'+i).hide(); - } - $('#stats_tabs'+selected).show(); - }); - - //////////////////////////////////////////////////////////////////////// - // Select the same tab across each sample group (when a Box Plot is - // selected for BXD, switching to Non-BXD will also display a Box Plot) - ////////////./////////////////////////////////////////////////////////// - - var $tabs1 = $('#stats_tabs0').tabs(); - var $tabs2 = $('#stats_tabs1').tabs(); - var $tabs3 = $('#stats_tabs2').tabs(); - - $tabs1.tabs({ - show: function(event, ui) { - var selected = $tabs1.tabs('option','selected'); - $tabs2.tabs('select',selected); - $tabs3.tabs('select',selected); - } - }); - $tabs2.tabs({ - show: function(event, ui) { - var selected = $tabs2.tabs('option','selected'); - $tabs1.tabs('select',selected); - $tabs3.tabs('select',selected); - } - }); - $tabs3.tabs({ - show: function(event, ui) { - var selected = $tabs3.tabs('option','selected'); - $tabs1.tabs('select',selected); - $tabs2.tabs('select',selected); - } - }); - - -/////////////////////////////// -//Calculate Correlations -/////////////////////////////// - - $('#sectionbody3').find('input[name="sample_corr"]').click(function() { - dbValue = $('select[name=database1] option:selected').val(); - $('input[name=database]').val(dbValue); - criteriaValue = $('select[name=criteria1] option:selected').val(); - $('input[name=criteria]').val(criteriaValue); - MDPValue = $('select[name=MDPChoice1] option:selected').val(); - $('input[name=MDPChoice]').val(MDPValue); - - methodValue = $('input[name=sample_method]:checked').val(); - - //This simple method can be used now that 'method' is defaulted to None instead of '' - if (methodValue == "1"){ - $('input[name=method]').val('1'); - } - else{ - $('input[name=method]').val('2'); - } - - dataEditingFunc(this.form,'correlation'); - }); - - $('#sectionbody3').find('input[name="lit_corr"]').click(function() { - dbValue = $('select[name=database2] option:selected').val(); - $('input[name=database]').val(dbValue); - criteriaValue = $('select[name=criteria2] option:selected').val(); - $('input[name=criteria]').val(criteriaValue); - MDPValue = $('select[name=MDPChoice2] option:selected').val(); - $('input[name=MDPChoice]').val(MDPValue); - - $('input[name=method]').val('3'); - - dataEditingFunc(this.form,'correlation'); - }); - - $('#sectionbody3').find('input[name="tiss_corr"]').click(function() { - dbValue = $('select[name=database3] option:selected').val(); - $('input[name=database]').val(dbValue); - criteriaValue = $('select[name=criteria3] option:selected').val(); - $('input[name=criteria]').val(criteriaValue); - MDPValue = $('select[name=MDPChoice3] option:selected').val(); - $('input[name=MDPChoice]').val(MDPValue); - - methodValue = $('input[name=tissue_method]:checked').val(); - - if (methodValue == "4"){ - $('input[name=method]').val('4'); - } - else{ - $('input[name=method]').val('5'); - } - dataEditingFunc(this.form,'correlation'); - }); - -/////////////////////////////// -//Mapping Tools -/////////////////////////////// - - $('#sectionbody4').find('input[name=interval]').click(function() { - chrValue = $('select[name=chromosomes1] option:selected').val(); - $('input[name=chromosomes]').val(chrValue); - scaleValue = $('select[name=scale1] option:selected').val(); - $('input[name=scale]').val(scaleValue); - $('input[name=controlLocus]').val(''); - - //Changed the way permValue, bootValue, and parentsValue are acquired; before it was $(____).is(':checked'); - permValue = $('input[name=permCheck1]:checked').val(); - $('input[name=permCheck]').val(permValue); - - bootValue = $('input[name=bootCheck1]:checked').val(); - $('input[name=bootCheck]').val(bootValue); - - if ($('input[name=parentsf14regression1]:checked').length > 0){ - $('input[name=parentsf14regression]').val('on'); - } else { - $('input[name=parentsf14regression]').val('off'); - } - - varValue = $('input[name=applyVarianceSE1]:checked').val(); - $('input[name=applyVarianceSE]').val(varValue); - - dataEditingFunc(this.form,'intervalMap'); - }); - - var tiptext = "e.g., rs12345"; - controlLocus = $('#sectionbody4').find('input[name=controlLocus]'); - - if(controlLocus.val() == '' || controlLocus == tiptext) { - controlLocus.addClass('searchtip').val(tiptext); - } - - controlLocus.focus(function(e) { - if(controlLocus.val() == tiptext) { - controlLocus.val(''); - } - controlLocus.removeClass('searchtip'); - }); - - controlLocus.blur(function(e) { - if(controlLocus.val() == '') { - controlLocus.addClass('searchtip').val(tiptext); - } else if(controlLocus.val() == tiptext) { - controlLocus.addClass('searchtip'); - } else { - controlLocus.removeClass('searchtip'); - } - }); - - $('#sectionbody4').find('input[name=composite]').click(function() { - chrValue = $('select[name=chromosomes2] option:selected').val(); - $('input[name=chromosomes]').val(chrValue); - scaleValue = $('select[name=scale2] option:selected').val(); - $('input[name=scale]').val(scaleValue); - controlValue = controlLocus.val(); - if (controlValue != tiptext){ - controlLocus.val(controlValue); - } - else{ - controlLocus.val(''); - } - - //Changed the way permValue, bootValue, and parentsValue are acquired; before it was $(____).is(':checked'); - permValue = $('input[name=permCheck2]:checked').val(); - $('input[name=permCheck]').val(permValue); - - bootValue = $('input[name=bootCheck2]:checked').val(); - $('input[name=bootCheck]').val(bootValue); - - if ($('input[name=parentsf14regression3]:checked').length > 0){ - $('input[name=parentsf14regression]').val('on'); - } else { - $('input[name=parentsf14regression]').val('off'); - } - - dataEditingFunc(this.form,'intervalMap'); - - }); - - $('#sectionbody4').find('input[name=marker]').click(function() { - //Changed the way parentsValue is acquired; before it was $(____).is(':checked'); - if ($('input[name=parentsf14regression2]:checked').length > 0){ - $('input[name=parentsf14regression]').val('on'); - } else { - $('input[name=parentsf14regression]').val('off'); - } - - varValue = $('input[name=applyVarianceSE2]:checked').val(); - $('input[name=applyVarianceSE]').val(varValue); - - dataEditingFunc(this.form,'markerRegression'); - }); - -/////////////////////////////// -//Review and Edit Data -/////////////////////////////// - - $('input[name=excludeGroup]').click(function(){ - for (i = 1;i <= Math.max(primary_row_count,other_row_count)-1; i++){ - valueExists = 0; - $('#Primary_'+i+',#Other_'+i).children().each(function(){ - if ($(this).text() == exclude_value) { - $('#Primary_'+i+',#Other_'+i).addClass('blocked').find('input[type=text]').val('x'); - valueExists = 1; - return false; - } - }); - } - }); - - $('.update').click(function(){ - windowName = 'formTarget' + (new Date().getTime()); - newWindow = open("",windowName,"menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=0,directories=1,width=900"); - document.dataInput.target = windowName; - document.dataInput.submitID.value = "basicStatistics"; - - primaryData = getTraitData()[0]; - otherData = getTraitData()[1]; - allData = getTraitData()[2]; - - if (otherData[0].length > 0) { - if ($('select[name="stats_mdp"] option:selected').val() == 0) { - document.dataInput.strainNames.value = allData[0].toString(); - document.dataInput.strainVals.value = allData[1].toString(); - document.dataInput.strainVars.value = allData[2].toString(); - } - else if ($('select[name="stats_mdp"] option:selected').val() == 1) { - document.dataInput.strainNames.value = primaryData[0].toString(); - document.dataInput.strainVals.value = primaryData[1].toString(); - document.dataInput.strainVars.value = primaryData[2].toString(); - } - else { - document.dataInput.strainNames.value = otherData[0].toString(); - document.dataInput.strainVals.value = otherData[1].toString(); - document.dataInput.strainVars.value = otherData[2].toString(); - } - } - else { - document.dataInput.strainNames.value = allData[0].toString(); - document.dataInput.strainVals.value = allData[1].toString(); - document.dataInput.strainVars.value = allData[2].toString(); - } - - document.dataInput.submit(); - }); - - $('input[name="export"]').click(function(){ - windowName = 'formTarget' + (new Date().getTime()); - newWindow = open("",windowName,"menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=0,directories=1,width=900"); - document.dataInput.target = windowName; - document.dataInput.submitID.value = "exportData"; - - primaryData = getTraitData()[0]; - otherData = getTraitData()[1]; - - document.dataInput.strainNames.value = primaryData[0].toString(); - document.dataInput.strainVals.value = primaryData[1].toString(); - document.dataInput.strainVars.value = primaryData[2].toString(); - - document.dataInput.otherStrainNames.value = otherData[0].toString(); - document.dataInput.otherStrainVals.value = otherData[1].toString(); - document.dataInput.otherStrainVars.value = otherData[2].toString(); - - attribute_names = new Array(); - $('#primary,#other').find('th.attribute_name').each(function(){ - attribute_names.push($(this).val().toString()); - }); - - primary_attribute_values = ""; //This string will be structured as a dictionary with a set of values for each attribute; it will be parsed in the ExportPage class - other_attribute_values = ""; - - attr_counter = 1; // Counter for each different attribute - row_counter = 1; // Counter for each value for each attribute - while (attr_counter <= attribute_names.length){ - attribute_name = $('#primary,#other').find('th.attribute_name:eq('+ (attr_counter-1).toString() + ')').text(); - primary_row_count = $('#primary').find('tr').length - 1; - other_row_count = $('#other').find('tr').length - 1; - - primary_attribute_values += attribute_name + " : "; - other_attribute_values += attribute_name + " : "; - - primary_value_string = ""; //This string of values (in the format 'a,b,c', etc) will be appended to the primary_attribute_values string - for (row_counter = 1;row_counter <= numPrimaryRows; row_counter++){ - value = $('#primary_attribute'+attr_counter.toString()+'_sample'+row_counter.toString()).text(); - if (row_counter == primary_row_count) { - primary_value_string += (value + " / "); - } - else{ - primary_value_string += (value + ","); - } - } - - primary_attribute_values += primary_value_string; - - other_value_string = ""; //This string of values (in the format 'a,b,c', etc) will be appended to the other_attribute_values string - for (row_counter = 1;row_counter <= numOtherRows; row_counter++){ - value = $('#other_attribute'+attr_counter.toString()+'_sample'+row_counter.toString()).text(); - if (row_counter == other_row_count) { - other_value_string += (value + " / "); - } - else{ - other_value_string += (value + ","); - } - } - other_attribute_values += other_value_string; - attr_counter += 1 - } - - document.dataInput.extra_attributes.value = primary_attribute_values; - document.dataInput.other_extra_attributes.value = other_attribute_values; - - document.dataInput.submit(); - }); - - var thisTable = $('#sortable1,#sortable2'); //ZS: variable representing each table, because it's used often - - thisTable.find('input[name="selectCheck"]').click(function(){ - if($(this).is(':checked')){ - $(this).parent("").parent("").children("td").css("background-color", "yellow"); - } - else{ - if(!($(this).parent().parent().hasClass('outlier'))){ - $(this).parent().parent().children("td").css("background-color", "white"); - } - } - }); - - $('input[name=resetButton]').click(function(){ - - //ZS: Reset "hide no value" and "hide outliers" - $('#showHideOptions').find('input[name=showHideNoValue]').val(' Hide No Value '); - $('#showHideOptions').find('input[name=showHideOutliers]').val(' Hide Outliers '); - noValShown = 1; - outliersShown = 1; - - for (i=1;i<=numPrimaryRows-1;i++){ - var thisRow = $('#Primary_'+i); - if (thisRow.is('.invisible')){ - thisRow.removeClass('invisible'); - } - if (thisRow.is('.blocked')){ - thisRow.removeClass('blocked'); - } - if (thisRow.is(':not(.outlier)')){ - thisRow.css("background-color", "white"); - } - - var thisValueField = thisRow.find('.valueField'); - - var originalValue = thisValueField[0].defaultValue; - var thisClassNames = thisRow.find('input:eq(1)').attr('class').split(/\s+/); - var valueClass = thisClassNames[thisClassNames.length-1]; - thisRow.find('input:eq(1)').removeClass(valueClass).addClass(originalValue).val(originalValue); - - if (thisValueField.length > 1){ - var originalValue = thisValueField[1].defaultValue; - var thisClassNames = thisRow.find('input:eq(2)').attr('class').split(/\s+/); - var valueClass = thisClassNames[thisClassNames.length-1]; - thisRow.find('input:eq(2)').removeClass(valueClass).addClass(originalValue).val(originalValue); - } - } - for (i=1;i<=numOtherRows-1;i++){ - var thisRow = $('#Other_'+i); - if (thisRow.is('.invisible')){ - thisRow.removeClass('invisible') - } - if (thisRow.is('.blocked')){ - thisRow.removeClass('blocked'); - } - if (thisRow.is(':not(.outlier)')){ - thisRow.css("background-color", "white"); - } - - var thisValueField = thisRow.find('.valueField'); - - var originalValue = thisValueField[0].defaultValue; - var thisClassNames = thisRow.find('input:eq(1)').attr('class').split(/\s+/); - var valueClass = thisClassNames[thisClassNames.length-1]; - thisRow.find('input:eq(1)').removeClass(valueClass).addClass(originalValue).val(originalValue); - - if (thisValueField.length > 1){ - var originalValue = thisValueField[1].defaultValue; - var thisClassNames = thisRow.find('input:eq(2)').attr('class').split(/\s+/); - var valueClass = thisClassNames[thisClassNames.length-1]; - thisRow.find('input:eq(2)').removeClass(valueClass).addClass(originalValue).val(originalValue); - } - } - }); - - var tiptext2 = "e.g., 4, 6-30, 43"; - var blockField = $('#showHideOptions').find('input[name=removeField]'); //ZS: Field where user inputs the index of the samples he/she wants to block; created variable because it's used often - - if(blockField.val() == '' || blockField.val() == tiptext2) { - blockField.addClass('searchtip'); - blockField.val(tiptext2); - } - - blockField.focus(function(e) { - if(blockField.val() == tiptext2) { - blockField.val(''); - } - blockField.removeClass('searchtip'); - }); - - blockField.blur(function(e) { - if(blockField.val() == '') { - blockField.addClass('searchtip'); - blockField.val(tiptext2); - } else if(blockField.val() == tiptext2) { - blockField.addClass('searchtip'); - } else { - blockField.removeClass('searchtip'); - } - }); - - var noValShown = new Boolean(1); - var outliersShown = new Boolean(1); - - $('#showHideOptions').bind('click', function(e){ - var target = e.target; - $target = $(target); - - if (target.name === 'blockSamples'){ - if (blockField.val() == tiptext2){ - blockField.val('') - } - blockedText = blockField.val(); - blockedTextSplit = new Array(); - blockedItems = new Array(); - - blockedTextSplit = blockedText.split(/\,/); - - for (i=0;i<=blockedTextSplit.length-1;i++) { - var item = blockedTextSplit[i]; - if(item.indexOf('-') != -1){ - subArray = new Array(); - subArray = item.split('-'); - num1 = parseInt(subArray[0]); - num2 = parseInt(subArray[1]); - for (j=num1;j<=num2;j=j+1){ - blockedItems.push(j); - } - } - else if(!(isNaN(item))) { - blockedItems.push(item); - } - } - - for (i=0;i<=blockedItems.length-1;i++) { - item = blockedItems[i]; - if ($('select[name=block_method]').val() == '0') { - var thisRow = $('#Other_'+item); - } - else { - var thisRow = $('#Primary_'+item); - } - - if (thisRow.is('.novalue')) { - continue; - } - else { - thisRow.addClass('blocked').find('input.valueField').val('x'); - } - - //First look at value cell - var thisCell = thisRow.find('input:eq(1)'); - var thisClassNames = thisCell.attr('class').split(/\s+/); - var valueClass = thisClassNames[thisClassNames.length-1]; - var header = thisRow.parents('table.tablesorter').find('th.header:contains("Value"):eq(0)'); - if (header.hasClass('headerSortUp')){ - thisCell.removeClass(valueClass).addClass('-9999'); - } else if (header.hasClass('headerSortDown')){ - thisCell.removeClass(valueClass).addClass('9999'); - } else { - thisCell.removeClass(valueClass).addClass('-9999'); - } - - //Check if there is an SE column - if (thisRow.find('input.valueField').length > 1) { - var thisCell = thisRow.find('input:eq(2)'); - var thisClassNames = thisCell.attr('class').split(/\s+/); - var valueClass = thisClassNames[thisClassNames.length-1]; - var header = thisRow.parents('table.tablesorter').find('th.header:contains("SE"):eq(0)'); - if (header.hasClass('headerSortUp')){ - thisCell.removeClass(valueClass).addClass('-9999'); - } else if (header.hasClass('headerSortDown')){ - thisCell.removeClass(valueClass).addClass('9999'); - } else { - thisCell.removeClass(valueClass).addClass('-9999'); - } - } - } - } - - else if (target.name === 'showHideNoValue'){ - if (noValShown) { - $('#showHideOptions').find('input[name=showHideNoValue]').val(' Show No Value '); - for (i=1;i<=Math.max(numPrimaryRows,numOtherRows)-1;i++) { - if (i<=numPrimaryRows-1) { - var thisRow = $('#Primary_'+i); - if (thisRow.is('.novalue:visible') || thisRow.is('.blocked:visible')){ - jQuery(thisRow).addClass('invisible'); - } - } - if (i<=numOtherRows-1){ - var thisOtherRow = $('#Other_'+i); - if (thisOtherRow.is('.novalue:visible') || thisOtherRow.is('.blocked:visible')){ - if (thisOtherRow.is(':visible')){ - jQuery(thisOtherRow).addClass('invisible'); - } - } - } - } - noValShown = 0; - } - else { - $('#showHideOptions').find('input[name=showHideNoValue]').val(' Hide No Value '); - for (i=1;i<=Math.max(numPrimaryRows,numOtherRows)-1;i++) { - if (i<=numPrimaryRows-1) { - var thisRow = $('#Primary_'+i); - if (thisRow.is('.novalue') || thisRow.is('.blocked')){ - jQuery(thisRow).removeClass('invisible'); - if (!(outliersShown)) { - if (thisRow.is('.outlier:visible')){ - jQuery(thisRow).addClass('invisible'); - } - } - } - } - if (i<=numOtherRows-1){ - var thisOtherRow = $('#Other_'+i); - if (thisOtherRow.is('.novalue') || thisOtherRow.is('.blocked')){ - jQuery(thisOtherRow).removeClass('invisible'); - if (!(outliersShown)) { - if (thisOtherRow.is('.outlier:visible')){ - jQuery(thisOtherRow).addClass('invisible'); - } - } - } - } - } - noValShown = 1; - } - } - - else if (target.name === 'showHideOutliers'){ - if (outliersShown){ - $('#showHideOptions').find('input[name=showHideOutliers]').val(' Show Outliers '); - for (i=1;i<=Math.max(numPrimaryRows,numOtherRows)-1;i++) { - if (i<=numPrimaryRows-1) { - thisRow = $('#Primary_'+i); - if (thisRow.is('.outlier:visible') && (!(thisRow.is('.invisible')))) { - thisRow.addClass('invisible') - } - } - if (i<=numOtherRows-1) { - thisOtherRow = $('#Other_'+i); - if (thisOtherRow.is('.outlier:visible') && (!(thisOtherRow.is('.invisible')))) { - thisOtherRow.addClass('invisible') - } - } - } - outliersShown = 0; - } - else { - $('#showHideOptions').find('input[name=showHideOutliers]').val(' Hide Outliers '); - for (i=1;i<=Math.max(numPrimaryRows,numOtherRows)-1;i++) { - if (i<=numPrimaryRows-1) { - thisRow = $('#Primary_'+i); - if (thisRow.is('.outlier') && (!(thisRow.is(':visible')))) { - if (!(noValShown)) { - if (thisRow.is('.blocked')){ - continue; - } - } - jQuery(thisRow).removeClass('invisible') - } - } - if (i<=numOtherRows-1) { - thisOtherRow = $('#Other_'+i); - if (thisOtherRow.is('.outlier') && (!(thisOtherRow.is(':visible')))) { - if (!(noValShown)) { - if (thisOtherRow.is('.blocked')){ - continue; - } - } - jQuery(thisOtherRow).removeClass('invisible') - } - } - } - outliersShown = 1; - } - } - return false; - }); -}); - -function getTraitData(){ - primary_row_count = $('#sortable1').find('tr').length - 1; - other_row_count = $('#sortable2').find('tr').length - 1; - - primaryStrainNames = new Array(); - primaryVals = new Array(); - primaryVars = new Array(); - - allStrainNames = new Array(); - allVals = new Array(); - allVars = new Array(); - - for (i = 1;i <= primary_row_count; i++){ - thisRow = $('#Primary_'+i); - strainName = thisRow.find('span:first').text(); - primaryStrainNames.push(strainName); - allStrainNames.push(strainName); - strainVal = thisRow.find('input:eq(1)').val(); - primaryVals.push(strainVal); - allVals.push(strainVal); - strainVar = ''; // Just to initialize it in case there is no var - strainVar = thisRow.find('input:eq(2)').val(); - primaryVars.push(strainVar); - allVars.push(strainVar); - } - - otherStrainNames = new Array(); - otherVals = new Array(); - otherVars = new Array(); - - for (j = 1;j <= other_row_count; j++){ - thisRow = $('#Other_'+j) - strainName = thisRow.find('span:first').text(); - otherStrainNames.push(strainName); - strainVal = thisRow.find('input:eq(1)').val(); - otherVals.push(strainVal); - strainVar = ''; // Just to initialize it in case there is no var - strainVar = thisRow.find('input:eq(2)').val(); - otherVars.push(strainVar); - - if (jQuery.inArray(strainName, allStrainNames) == -1) { - allStrainNames.push(strainName); - allVals.push(strainVal); - allVars.push(strainVar); - } - } - - primaryData = [primaryStrainNames, primaryVals, primaryVars]; - otherData = [otherStrainNames, otherVals, otherVars]; - allData = [allStrainNames, allVals, allVars]; - - return [primaryData, otherData, allData]; -} + var thisTable = $('#sortable1,#sortable2'); + thisTable.bind("update propertychange keyup input paste", function (e) { -/* -used by networkGraphPageBody.py -*/ + var target = e.target; + $target = $(target); -//Default to plain text + symbol for the "Export Graph File" button -$('input[name=exportGraphFile]').live('click', function() { window.open($('input[name=exportFilename]').val() + "_plain_symbol.txt") }); + if (target.nodeName.toLowerCase() == 'input') { + thisClassNames = $target.attr('class').split(/\s+/); + valueClass = thisClassNames[thisClassNames.length - 1]; + newValue = $target.val(); + thisParent = $target.parent('td'); + thisParentId = thisParent.attr('id'); + + $target.removeClass(valueClass); + + if (newValue == 'x') { + thisParent.parent('tr').addClass('blocked'); + } else { + $('#' + thisParentId).children('input.valueField:eq(0)').addClass(newValue); + } + } + }); + + //////////////////////////////////// + // Initially close tabs + //////////////////////////////////// + thisForm = $('form[name="dataInput"]'); + + $('#sectionbody2').hide(); + $('#sectionbody3').hide(); + $('#sectionbody4').hide(); + + $('#title1').click(function () { + $('#sectionbody1').toggle(); + return false; + }); + $('#title2').click(function () { + $('#sectionbody2').toggle(); + return false; + }); + $('#title3').click(function () { + $('#sectionbody3').toggle(); + return false; + }); + $('#title4').click(function () { + $('#sectionbody4').toggle(); + return false; + }); + $('#title5').click(function () { + $('#sectionbody5').toggle(); + return false; + }); -function changeFormat(graphName){ - var graphFormat = $('#exportFormat').val(); - var traitType = $('#traitType').val(); - $('input[name=exportGraphFile]').die('click'); - if (graphFormat=="xgmml"){ - if (traitType=="symbol"){ - var graphFile = graphName+ "_xgmml_symbol.txt"; - $('input[name=exportGraphFile]').live('click', function() { window.open(graphFile) }); + ////////////////////////////////////////////////////////////// + // Switch out + and - icon when you click each section header + ////////////////////////////////////////////////////////////// + var expand_html = "  \"Expand\""; + var contract_html = "  \"Contract\""; + + $('#title2, #title3, #title4').prepend(expand_html).addClass('1'); + + $('#title1, #title5').prepend(contract_html).addClass('0'); + + for (i = 1; i <= 5; i++) { + $('#title' + i).click(function () { + if ($(this).hasClass('0')) { + $(this).find('span').replaceWith(expand_html); + $(this).removeClass('0'); + $(this).addClass('1'); + } else { + $(this).find('span').replaceWith(contract_html); + $(this).removeClass('1'); + $(this).addClass('0'); + } + }); + } + + // Exclude cases by attributes + $('div.attribute_values:first').css('display', 'inline'); //Display the dropdown menu with the first attribute's distinct values + $('select[name=exclude_menu]').change(function () { + $('div.attribute_values').css('display', 'none'); //clear all other menus when a new attribute is selected + attribute = $(this).val(); + //attribute = $('select[name=exclude_menu]').val(); + menu = $('div.attribute_values').find('[name=\'' + attribute + '\']'); + menu.parent().css('display', 'inline'); + }); + + primary_row_count = $('#primary').find('tr').length - 1; + other_row_count = $('#other').find('tr').length - 1; + + if (primary_row_count >= other_row_count) { + row_count = primary_row_count; + } else { + row_count = other_row_count; + } + + $('div.attribute_values').children('select').change(function () { + exclude_value = $(this).val(); + }); +}); + +$(window).load(function () { + + //ZS: These are needed in a few places; looping through rows by index is faster than doing a "find" search + numPrimaryRows = $('#sortable1').find('tr').length; + numOtherRows = $('#sortable2').find('tr').length; + + + /////////////////////////////// + //Basic Statistics + /////////////////////////////// + ///////////////////////////////////////////////////////////////// + // Hide unselected Basic Statistics tabs (when just BXD strains + // are selected, hide the results for all strains/non-BXD) + ///////////////////////////////////////////////////////////////// + $('#stats_tabs1').hide(); + $('#stats_tabs2').hide(); + + $('#sectionbody2').find('select[name=stats_mdp]').change(function () { + selected = $('#sectionbody2').find('select[name=stats_mdp] option:selected').val(); + for (i = 0; i <= 2; i++) { + $('#stats_tabs' + i).hide(); + } + $('#stats_tabs' + selected).show(); + }); + + //////////////////////////////////////////////////////////////////////// + // Select the same tab across each sample group (when a Box Plot is + // selected for BXD, switching to Non-BXD will also display a Box Plot) + ////////////./////////////////////////////////////////////////////////// + var $tabs1 = $('#stats_tabs0').tabs(); + var $tabs2 = $('#stats_tabs1').tabs(); + var $tabs3 = $('#stats_tabs2').tabs(); + + $tabs1.tabs({ + show: function (event, ui) { + var selected = $tabs1.tabs('option', 'selected'); + $tabs2.tabs('select', selected); + $tabs3.tabs('select', selected); + } + }); + $tabs2.tabs({ + show: function (event, ui) { + var selected = $tabs2.tabs('option', 'selected'); + $tabs1.tabs('select', selected); + $tabs3.tabs('select', selected); + } + }); + $tabs3.tabs({ + show: function (event, ui) { + var selected = $tabs3.tabs('option', 'selected'); + $tabs1.tabs('select', selected); + $tabs2.tabs('select', selected); + } + }); + + + /////////////////////////////// + //Calculate Correlations + /////////////////////////////// + $('#sectionbody3').find('input[name="sample_corr"]').click(function () { + dbValue = $('select[name=database1] option:selected').val(); + $('input[name=database]').val(dbValue); + criteriaValue = $('select[name=criteria1] option:selected').val(); + $('input[name=criteria]').val(criteriaValue); + MDPValue = $('select[name=MDPChoice1] option:selected').val(); + $('input[name=MDPChoice]').val(MDPValue); + + methodValue = $('input[name=sample_method]:checked').val(); + + //This simple method can be used now that 'method' is defaulted to None instead of '' + if (methodValue == "1") { + $('input[name=method]').val('1'); + } else { + $('input[name=method]').val('2'); + } + + dataEditingFunc(this.form, 'correlation'); + }); + + $('#sectionbody3').find('input[name="lit_corr"]').click(function () { + dbValue = $('select[name=database2] option:selected').val(); + $('input[name=database]').val(dbValue); + criteriaValue = $('select[name=criteria2] option:selected').val(); + $('input[name=criteria]').val(criteriaValue); + MDPValue = $('select[name=MDPChoice2] option:selected').val(); + $('input[name=MDPChoice]').val(MDPValue); + + $('input[name=method]').val('3'); + + dataEditingFunc(this.form, 'correlation'); + }); + + $('#sectionbody3').find('input[name="tiss_corr"]').click(function () { + dbValue = $('select[name=database3] option:selected').val(); + $('input[name=database]').val(dbValue); + criteriaValue = $('select[name=criteria3] option:selected').val(); + $('input[name=criteria]').val(criteriaValue); + MDPValue = $('select[name=MDPChoice3] option:selected').val(); + $('input[name=MDPChoice]').val(MDPValue); + + methodValue = $('input[name=tissue_method]:checked').val(); + + if (methodValue == "4") { + $('input[name=method]').val('4'); + } else { + $('input[name=method]').val('5'); + } + dataEditingFunc(this.form, 'correlation'); + }); + + /////////////////////////////// + //Mapping Tools + /////////////////////////////// + $('#sectionbody4').find('input[name=interval]').click(function () { + chrValue = $('select[name=chromosomes1] option:selected').val(); + $('input[name=chromosomes]').val(chrValue); + scaleValue = $('select[name=scale1] option:selected').val(); + $('input[name=scale]').val(scaleValue); + $('input[name=controlLocus]').val(''); + + //Changed the way permValue, bootValue, and parentsValue are acquired; before it was $(____).is(':checked'); + permValue = $('input[name=permCheck1]:checked').val(); + $('input[name=permCheck]').val(permValue); + + bootValue = $('input[name=bootCheck1]:checked').val(); + $('input[name=bootCheck]').val(bootValue); + + if ($('input[name=parentsf14regression1]:checked').length > 0) { + $('input[name=parentsf14regression]').val('on'); + } else { + $('input[name=parentsf14regression]').val('off'); + } + + varValue = $('input[name=applyVarianceSE1]:checked').val(); + $('input[name=applyVarianceSE]').val(varValue); + + dataEditingFunc(this.form, 'intervalMap'); + }); + + var tiptext = "e.g., rs12345"; + controlLocus = $('#sectionbody4').find('input[name=controlLocus]'); + + if (controlLocus.val() == '' || controlLocus == tiptext) { + controlLocus.addClass('searchtip').val(tiptext); + } + + controlLocus.focus(function (e) { + if (controlLocus.val() == tiptext) { + controlLocus.val(''); + } + controlLocus.removeClass('searchtip'); + }); + + controlLocus.blur(function (e) { + if (controlLocus.val() == '') { + controlLocus.addClass('searchtip').val(tiptext); + } else if (controlLocus.val() == tiptext) { + controlLocus.addClass('searchtip'); + } else { + controlLocus.removeClass('searchtip'); + } + }); + + $('#sectionbody4').find('input[name=composite]').click(function () { + chrValue = $('select[name=chromosomes2] option:selected').val(); + $('input[name=chromosomes]').val(chrValue); + scaleValue = $('select[name=scale2] option:selected').val(); + $('input[name=scale]').val(scaleValue); + controlValue = controlLocus.val(); + if (controlValue != tiptext) { + controlLocus.val(controlValue); + } else { + controlLocus.val(''); + } + + //Changed the way permValue, bootValue, and parentsValue are acquired; before it was $(____).is(':checked'); + permValue = $('input[name=permCheck2]:checked').val(); + $('input[name=permCheck]').val(permValue); + + bootValue = $('input[name=bootCheck2]:checked').val(); + $('input[name=bootCheck]').val(bootValue); + + if ($('input[name=parentsf14regression3]:checked').length > 0) { + $('input[name=parentsf14regression]').val('on'); + } else { + $('input[name=parentsf14regression]').val('off'); + } + + dataEditingFunc(this.form, 'intervalMap'); + + }); + + $('#sectionbody4').find('input[name=marker]').click(function () { + //Changed the way parentsValue is acquired; before it was $(____).is(':checked'); + if ($('input[name=parentsf14regression2]:checked').length > 0) { + $('input[name=parentsf14regression]').val('on'); + } else { + $('input[name=parentsf14regression]').val('off'); + } + + varValue = $('input[name=applyVarianceSE2]:checked').val(); + $('input[name=applyVarianceSE]').val(varValue); + + dataEditingFunc(this.form, 'markerRegression'); + }); + + /////////////////////////////// + //Review and Edit Data + /////////////////////////////// + $('input[name=excludeGroup]').click(function () { + for (i = 1; i <= Math.max(primary_row_count, other_row_count) - 1; i++) { + valueExists = 0; + $('#Primary_' + i + ',#Other_' + i).children().each(function () { + if ($(this).text() == exclude_value) { + $('#Primary_' + i + ',#Other_' + i).addClass('blocked').find('input[type=text]').val('x'); + valueExists = 1; + return false; } - else if (traitType=="name"){ - var graphFile = graphName+ "_xgmml_name.txt"; - $('input[name=exportGraphFile]').live('click', function() { window.open(graphFile) }); + }); + } + }); + + $('.update').click(function () { + windowName = 'formTarget' + (new Date().getTime()); + var windowHeight; // windowHeight and windowWidth are used to place the window in the center of the screen + var windowWidth; + windowHeight = (window.screen.height/2) - (350 + 10) + windowWidth = (window.screen.width/2) - (450 + 50) + newWindow = open("",windowName,"menubar=1,toolbar=1,resizable=1,left=" + windowWidth + ",top=" + windowHeight + ",screenX=" + windowWidth + ",screenY=" + windowHeight + ",status=1,scrollbars=0,directories=1"); + + document.dataInput.target = windowName; + document.dataInput.submitID.value = "basicStatistics"; + + primaryData = getTraitData()[0]; + otherData = getTraitData()[1]; + allData = getTraitData()[2]; + + if (otherData[0].length > 0) { + if ($('select[name="stats_mdp"] option:selected').val() == 0) { + document.dataInput.strainNames.value = allData[0].toString(); + document.dataInput.strainVals.value = allData[1].toString(); + document.dataInput.strainVars.value = allData[2].toString(); + } else if ($('select[name="stats_mdp"] option:selected').val() == 1) { + document.dataInput.strainNames.value = primaryData[0].toString(); + document.dataInput.strainVals.value = primaryData[1].toString(); + document.dataInput.strainVars.value = primaryData[2].toString(); + } else { + document.dataInput.strainNames.value = otherData[0].toString(); + document.dataInput.strainVals.value = otherData[1].toString(); + document.dataInput.strainVars.value = otherData[2].toString(); + } + } else { + document.dataInput.strainNames.value = allData[0].toString(); + document.dataInput.strainVals.value = allData[1].toString(); + document.dataInput.strainVars.value = allData[2].toString(); + } + + document.dataInput.submit(); + }); + + $('input[name="export"]').click(function () { + windowName = 'formTarget' + (new Date().getTime()); + newWindow = open("", windowName, "menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=0,directories=1,width=900"); + document.dataInput.target = windowName; + document.dataInput.submitID.value = "exportData"; + + primaryData = getTraitData()[0]; + otherData = getTraitData()[1]; + + document.dataInput.strainNames.value = primaryData[0].toString(); + document.dataInput.strainVals.value = primaryData[1].toString(); + document.dataInput.strainVars.value = primaryData[2].toString(); + + document.dataInput.otherStrainNames.value = otherData[0].toString(); + document.dataInput.otherStrainVals.value = otherData[1].toString(); + document.dataInput.otherStrainVars.value = otherData[2].toString(); + + attribute_names = new Array(); + $('#primary,#other').find('th.attribute_name').each(function () { + attribute_names.push($(this).val().toString()); + }); + + primary_attribute_values = ""; //This string will be structured as a dictionary with a set of values for each attribute; it will be parsed in the ExportPage class + other_attribute_values = ""; + + attr_counter = 1; // Counter for each different attribute + row_counter = 1; // Counter for each value for each attribute + while (attr_counter <= attribute_names.length) { + attribute_name = $('#primary,#other').find('th.attribute_name:eq(' + (attr_counter - 1).toString() + ')').text(); + primary_row_count = $('#primary').find('tr').length - 1; + other_row_count = $('#other').find('tr').length - 1; + + primary_attribute_values += attribute_name + " : "; + other_attribute_values += attribute_name + " : "; + + primary_value_string = ""; //This string of values (in the format 'a,b,c', etc) will be appended to the primary_attribute_values string + for (row_counter = 1; row_counter <= numPrimaryRows; row_counter++) { + value = $('#primary_attribute' + attr_counter.toString() + '_sample' + row_counter.toString()).text(); + if (row_counter == primary_row_count) { + primary_value_string += (value + " / "); + } else { + primary_value_string += (value + ","); } + } + + primary_attribute_values += primary_value_string; + + other_value_string = ""; //This string of values (in the format 'a,b,c', etc) will be appended to the other_attribute_values string + for (row_counter = 1; row_counter <= numOtherRows; row_counter++) { + value = $('#other_attribute' + attr_counter.toString() + '_sample' + row_counter.toString()).text(); + if (row_counter == other_row_count) { + other_value_string += (value + " / "); + } else { + other_value_string += (value + ","); + } + } + other_attribute_values += other_value_string; + attr_counter += 1 + } + + document.dataInput.extra_attributes.value = primary_attribute_values; + document.dataInput.other_extra_attributes.value = other_attribute_values; + + document.dataInput.submit(); + }); + + var thisTable = $('#sortable1,#sortable2'); //ZS: variable representing each table, because it's used often + thisTable.find('input[name="selectCheck"]').click(function () { + if ($(this).is(':checked')) { + $(this).parent("").parent("").children("td").css("background-color", "yellow"); + } else { + if (!($(this).parent().parent().hasClass('outlier'))) { + $(this).parent().parent().children("td").css("background-color", "white"); + } } + }); - else if (graphFormat=="plain"){ - if (traitType=="symbol"){ - var graphFile = graphName+ "_plain_symbol.txt"; - $('input[name=exportGraphFile]').live('click', function() { window.open(graphFile) }); + $('input[name=resetButton]').click(function () { + + //ZS: Reset "hide no value" and "hide outliers" + $('#showHideOptions').find('input[name=showHideNoValue]').val(' Hide No Value '); + $('#showHideOptions').find('input[name=showHideOutliers]').val(' Hide Outliers '); + noValShown = 1; + outliersShown = 1; + + for (i = 1; i <= numPrimaryRows - 1; i++) { + var thisRow = $('#Primary_' + i); + if (thisRow.is('.invisible')) { + thisRow.removeClass('invisible'); + } + if (thisRow.is('.blocked')) { + thisRow.removeClass('blocked'); + } + if (thisRow.is(':not(.outlier)')) { + thisRow.css("background-color", "white"); + } + + var thisValueField = thisRow.find('.valueField'); + + var originalValue = thisValueField[0].defaultValue; + var thisClassNames = thisRow.find('input:eq(1)').attr('class').split(/\s+/); + var valueClass = thisClassNames[thisClassNames.length - 1]; + thisRow.find('input:eq(1)').removeClass(valueClass).addClass(originalValue).val(originalValue); + + if (thisValueField.length > 1) { + var originalValue = thisValueField[1].defaultValue; + var thisClassNames = thisRow.find('input:eq(2)').attr('class').split(/\s+/); + var valueClass = thisClassNames[thisClassNames.length - 1]; + thisRow.find('input:eq(2)').removeClass(valueClass).addClass(originalValue).val(originalValue); + } + } + for (i = 1; i <= numOtherRows - 1; i++) { + var thisRow = $('#Other_' + i); + if (thisRow.is('.invisible')) { + thisRow.removeClass('invisible') + } + if (thisRow.is('.blocked')) { + thisRow.removeClass('blocked'); + } + if (thisRow.is(':not(.outlier)')) { + thisRow.css("background-color", "white"); + } + + var thisValueField = thisRow.find('.valueField'); + + var originalValue = thisValueField[0].defaultValue; + var thisClassNames = thisRow.find('input:eq(1)').attr('class').split(/\s+/); + var valueClass = thisClassNames[thisClassNames.length - 1]; + thisRow.find('input:eq(1)').removeClass(valueClass).addClass(originalValue).val(originalValue); + + if (thisValueField.length > 1) { + var originalValue = thisValueField[1].defaultValue; + var thisClassNames = thisRow.find('input:eq(2)').attr('class').split(/\s+/); + var valueClass = thisClassNames[thisClassNames.length - 1]; + thisRow.find('input:eq(2)').removeClass(valueClass).addClass(originalValue).val(originalValue); + } + } + }); + + var tiptext2 = "e.g., 4, 6-30, 43"; + var blockField = $('#showHideOptions').find('input[name=removeField]'); //ZS: Field where user inputs the index of the samples he/she wants to block; created variable because it's used often + if (blockField.val() == '' || blockField.val() == tiptext2) { + blockField.addClass('searchtip'); + blockField.val(tiptext2); + } + + blockField.focus(function (e) { + if (blockField.val() == tiptext2) { + blockField.val(''); + } + blockField.removeClass('searchtip'); + }); + + blockField.blur(function (e) { + if (blockField.val() == '') { + blockField.addClass('searchtip'); + blockField.val(tiptext2); + } else if (blockField.val() == tiptext2) { + blockField.addClass('searchtip'); + } else { + blockField.removeClass('searchtip'); + } + }); + + var noValShown = new Boolean(1); + var outliersShown = new Boolean(1); + + $('#showHideOptions').bind('click', function (e) { + var target = e.target; + $target = $(target); + + if (target.name === 'blockSamples') { + if (blockField.val() == tiptext2) { + blockField.val('') + } + blockedText = blockField.val(); + blockedTextSplit = new Array(); + blockedItems = new Array(); + + blockedTextSplit = blockedText.split(/\,/); + + for (i = 0; i <= blockedTextSplit.length - 1; i++) { + var item = blockedTextSplit[i]; + if (item.indexOf('-') != -1) { + subArray = new Array(); + subArray = item.split('-'); + num1 = parseInt(subArray[0]); + num2 = parseInt(subArray[1]); + for (j = num1; j <= num2; j = j + 1) { + blockedItems.push(j); + } + } else if (!(isNaN(item))) { + blockedItems.push(item); + } + } + + for (i = 0; i <= blockedItems.length - 1; i++) { + item = blockedItems[i]; + if ($('select[name=block_method]').val() == '0') { + var thisRow = $('#Other_' + item); + } else { + var thisRow = $('#Primary_' + item); + } + + if (thisRow.is('.novalue')) { + continue; + } else { + thisRow.addClass('blocked').find('input.valueField').val('x'); + } + + //First look at value cell + var thisCell = thisRow.find('input:eq(1)'); + var thisClassNames = thisCell.attr('class').split(/\s+/); + var valueClass = thisClassNames[thisClassNames.length - 1]; + var header = thisRow.parents('table.tablesorter').find('th.header:contains("Value"):eq(0)'); + if (header.hasClass('headerSortUp')) { + thisCell.removeClass(valueClass).addClass('-9999'); + } else if (header.hasClass('headerSortDown')) { + thisCell.removeClass(valueClass).addClass('9999'); + } else { + thisCell.removeClass(valueClass).addClass('-9999'); + } + + //Check if there is an SE column + if (thisRow.find('input.valueField').length > 1) { + var thisCell = thisRow.find('input:eq(2)'); + var thisClassNames = thisCell.attr('class').split(/\s+/); + var valueClass = thisClassNames[thisClassNames.length - 1]; + var header = thisRow.parents('table.tablesorter').find('th.header:contains("SE"):eq(0)'); + if (header.hasClass('headerSortUp')) { + thisCell.removeClass(valueClass).addClass('-9999'); + } else if (header.hasClass('headerSortDown')) { + thisCell.removeClass(valueClass).addClass('9999'); + } else { + thisCell.removeClass(valueClass).addClass('-9999'); + } + } + } + } else if (target.name === 'showHideNoValue') { + if (noValShown) { + $('#showHideOptions').find('input[name=showHideNoValue]').val(' Show No Value '); + for (i = 1; i <= Math.max(numPrimaryRows, numOtherRows) - 1; i++) { + if (i <= numPrimaryRows - 1) { + var thisRow = $('#Primary_' + i); + if (thisRow.is('.novalue:visible') || thisRow.is('.blocked:visible')) { + jQuery(thisRow).addClass('invisible'); + } + } + if (i <= numOtherRows - 1) { + var thisOtherRow = $('#Other_' + i); + if (thisOtherRow.is('.novalue:visible') || thisOtherRow.is('.blocked:visible')) { + if (thisOtherRow.is(':visible')) { + jQuery(thisOtherRow).addClass('invisible'); + } + } + } + } + noValShown = 0; + } else { + $('#showHideOptions').find('input[name=showHideNoValue]').val(' Hide No Value '); + for (i = 1; i <= Math.max(numPrimaryRows, numOtherRows) - 1; i++) { + if (i <= numPrimaryRows - 1) { + var thisRow = $('#Primary_' + i); + if (thisRow.is('.novalue') || thisRow.is('.blocked')) { + jQuery(thisRow).removeClass('invisible'); + if (!(outliersShown)) { + if (thisRow.is('.outlier:visible')) { + jQuery(thisRow).addClass('invisible'); + } + } + } + } + if (i <= numOtherRows - 1) { + var thisOtherRow = $('#Other_' + i); + if (thisOtherRow.is('.novalue') || thisOtherRow.is('.blocked')) { + jQuery(thisOtherRow).removeClass('invisible'); + if (!(outliersShown)) { + if (thisOtherRow.is('.outlier:visible')) { + jQuery(thisOtherRow).addClass('invisible'); + } + } + } + } } - else if (traitType=="name"){ - var graphFile = graphName+ "_plain_name.txt"; - $('input[name=exportGraphFile]').live('click', function() { window.open(graphFile) }); + noValShown = 1; + } + } else if (target.name === 'showHideOutliers') { + if (outliersShown) { + $('#showHideOptions').find('input[name=showHideOutliers]').val(' Show Outliers '); + for (i = 1; i <= Math.max(numPrimaryRows, numOtherRows) - 1; i++) { + if (i <= numPrimaryRows - 1) { + thisRow = $('#Primary_' + i); + if (thisRow.is('.outlier:visible') && (!(thisRow.is('.invisible')))) { + thisRow.addClass('invisible') + } + } + if (i <= numOtherRows - 1) { + thisOtherRow = $('#Other_' + i); + if (thisOtherRow.is('.outlier:visible') && (!(thisOtherRow.is('.invisible')))) { + thisOtherRow.addClass('invisible') + } + } + } + outliersShown = 0; + } else { + $('#showHideOptions').find('input[name=showHideOutliers]').val(' Hide Outliers '); + for (i = 1; i <= Math.max(numPrimaryRows, numOtherRows) - 1; i++) { + if (i <= numPrimaryRows - 1) { + thisRow = $('#Primary_' + i); + if (thisRow.is('.outlier') && (!(thisRow.is(':visible')))) { + if (!(noValShown)) { + if (thisRow.is('.blocked')) { + continue; + } + } + jQuery(thisRow).removeClass('invisible') + } + } + if (i <= numOtherRows - 1) { + thisOtherRow = $('#Other_' + i); + if (thisOtherRow.is('.outlier') && (!(thisOtherRow.is(':visible')))) { + if (!(noValShown)) { + if (thisOtherRow.is('.blocked')) { + continue; + } + } + jQuery(thisOtherRow).removeClass('invisible') + } + } } + outliersShown = 1; + } + } + return false; + }); +}); + +function getTraitData() { + primary_row_count = $('#sortable1').find('tr').length - 1; + other_row_count = $('#sortable2').find('tr').length - 1; + + primaryStrainNames = new Array(); + primaryVals = new Array(); + primaryVars = new Array(); + + allStrainNames = new Array(); + allVals = new Array(); + allVars = new Array(); + + for (i = 1; i <= primary_row_count; i++) { + thisRow = $('#Primary_' + i); + strainName = thisRow.find('span:first').text(); + primaryStrainNames.push(strainName); + allStrainNames.push(strainName); + strainVal = thisRow.find('input:eq(1)').val(); + primaryVals.push(strainVal); + allVals.push(strainVal); + strainVar = ''; // Just to initialize it in case there is no var + strainVar = thisRow.find('input:eq(2)').val(); + primaryVars.push(strainVar); + allVars.push(strainVar); + } + + otherStrainNames = new Array(); + otherVals = new Array(); + otherVars = new Array(); + + for (j = 1; j <= other_row_count; j++) { + thisRow = $('#Other_' + j) + strainName = thisRow.find('span:first').text(); + otherStrainNames.push(strainName); + strainVal = thisRow.find('input:eq(1)').val(); + otherVals.push(strainVal); + strainVar = ''; // Just to initialize it in case there is no var + strainVar = thisRow.find('input:eq(2)').val(); + otherVars.push(strainVar); + + if (jQuery.inArray(strainName, allStrainNames) == -1) { + allStrainNames.push(strainName); + allVals.push(strainVal); + allVars.push(strainVar); } + } + + primaryData = [primaryStrainNames, primaryVals, primaryVars]; + otherData = [otherStrainNames, otherVals, otherVars]; + allData = [allStrainNames, allVals, allVars]; + + return [primaryData, otherData, allData]; } +/* +used by networkGraphPageBody.py +*/ + +//Default to plain text + symbol for the "Export Graph File" button +$('input[name=exportGraphFile]').live('click', function () { + window.open($('input[name=exportFilename]').val() + "_plain_symbol.txt") +}); + +function changeFormat(graphName) { + var graphFormat = $('#exportFormat').val(); + var traitType = $('#traitType').val(); + + $('input[name=exportGraphFile]').die('click'); + + if (graphFormat == "xgmml") { + if (traitType == "symbol") { + var graphFile = graphName + "_xgmml_symbol.txt"; + $('input[name=exportGraphFile]').live('click', function () { + window.open(graphFile) + }); + } else if (traitType == "name") { + var graphFile = graphName + "_xgmml_name.txt"; + $('input[name=exportGraphFile]').live('click', function () { + window.open(graphFile) + }); + } + } else if (graphFormat == "plain") { + if (traitType == "symbol") { + var graphFile = graphName + "_plain_symbol.txt"; + $('input[name=exportGraphFile]').live('click', function () { + window.open(graphFile) + }); + } else if (traitType == "name") { + var graphFile = graphName + "_plain_name.txt"; + $('input[name=exportGraphFile]').live('click', function () { + window.open(graphFile) + }); + } + } +} \ No newline at end of file -- cgit v1.2.3 From 63297d5f4eb61541cb98dcbca668410f6550257a Mon Sep 17 00:00:00 2001 From: Sam Ockman Date: Fri, 1 Jun 2012 02:03:02 -0400 Subject: Views and templates modified to allow template analysis --- web/javascript/webqtl.js | 184 +++++++++++----------- wqflask/runserver.py | 6 + wqflask/wqflask/search_results.py | 6 +- wqflask/wqflask/templates/search_result_page.html | 5 +- wqflask/wqflask/views.py | 4 + 5 files changed, 111 insertions(+), 94 deletions(-) (limited to 'web/javascript') diff --git a/web/javascript/webqtl.js b/web/javascript/webqtl.js index 19ecf3b7..536e7d26 100755 --- a/web/javascript/webqtl.js +++ b/web/javascript/webqtl.js @@ -38,16 +38,16 @@ function makeTree(thisForm, nnn){ j += 1; } } - + var windowName = 'formTarget' + (new Date().getTime()); var newWindow = open("", windowName,"width=900,menubar=0,toolbar=1,resizable=1,status=1,scrollbars=1"); var html = ""; if (j > 0) - { + { var waithtml1 ="
Your list of "+j+" transcripts is being exported to the Gene Ontology Tree Machine for analysis. This window will soon be replaced with the main GOTM results.
"; } else - { + { var waithtml1 ="
Your should select at least one transcript to export to the Gene Ontology Tree Machine for analysis.
"; } html += waithtml1; @@ -152,7 +152,11 @@ function showDatabase3(formName, Database,ProbeSetID,CellID){ document[formName].database.value = Database; document[formName].ProbeSetID.value = ProbeSetID; document[formName].CellID.value = CellID; - document[formName].submit(); + console.log("formName:", formName) + console.log("document[formName]:", document[formName]) + console.log("submit turned off for debugging") + console.log("showDatabase3 is deprecated for the flask version of this site") + //document[formName].submit(); } @@ -188,10 +192,10 @@ function showTrait(fmName){ var thisForm = getForm(fmName); if (thisForm == null || showTrait.arguments.length < 2) return; - + windowName = genNewWin(); thisForm.target = windowName; - + thisForm.FormID.value = "showDatabase"; thisForm.ProbeSetID.value = showTrait.arguments[1]; if (showTrait.arguments.length > 2) @@ -205,10 +209,10 @@ function showCateGraph(fmName){ var thisForm = getForm(fmName); if (thisForm == null || showCateGraph.arguments.length < 2) return; - + windowName = genNewWin(); thisForm.target = windowName; - + thisForm.FormID.value = "showCategoryGraph"; thisForm.interval1.value = showCateGraph.arguments[1]; thisForm.interval2.value = showCateGraph.arguments[2]; @@ -219,22 +223,22 @@ function showCorrPlot(fmName){ var thisForm = getForm(fmName); if (thisForm == null || showCorrPlot.arguments.length < 2) return; - + windowName = genNewWin(); thisForm.target = windowName; - + thisForm.FormID.value = "showCorrelationPlot"; thisForm.ProbeSetID.value = showCorrPlot.arguments[1]; if (showCorrPlot.arguments.length > 2) thisForm.CellID.value = showCorrPlot.arguments[2]; else thisForm.CellID.value = ""; - + thisForm.X_geneSymbol.value = null; thisForm.Y_geneSymbol.value = null; thisForm.submit(); - + } @@ -242,12 +246,12 @@ function showCorrPlotThird(fmName){ var thisForm = getForm(fmName); if (thisForm == null || showCorrPlotThird.arguments.length < 3) return; - + windowName = genNewWin(); thisForm.target = windowName; - + var olddb = thisForm.database.value; - + thisForm.FormID.value = "showCorrelationPlot"; thisForm.database.value = showCorrPlotThird.arguments[1]; thisForm.ProbeSetID.value = showCorrPlotThird.arguments[2]; @@ -284,15 +288,15 @@ function ODE(thisForm, script){ var windowName = 'formTarget' + (new Date().getTime()); var newWindow = open("", windowName, "width=900,menubar=0,toolbar=1,resizable=1,status=1,scrollbars=1"); var html = ""; - if (j == 0){ + if (j == 0){ j = length; trait_list2 = trait_list_all; correlation2 = correlation_all; llid_list2 = llid_list_all; } - + var waithtml1 ="
Your list of "+j+" transcripts is being exported to the ODE for analysis. This window will soon be replaced with the results.
"; - + html += waithtml1; newWindow.document.write(html); newWindow.document.close(); @@ -302,14 +306,14 @@ function ODE(thisForm, script){ thisForm.correlation.value = correlation2.join(','); thisForm.id_value.value = thisForm.correlation.value; thisForm.llid_list.value = llid_list2.join(','); - + // ODE - + thisForm.idtype.value = thisForm.id_type.value; thisForm.species.value = thisForm.org.value; thisForm.list.value = thisForm.id_list.value; thisForm.client.value = "genenetwork"; - + thisForm.target = windowName; var oldaction = thisForm.action; thisForm.action = script; @@ -318,13 +322,13 @@ function ODE(thisForm, script){ } } */ -// 02/12/2009 +// 02/12/2009 // Lei Yan /*scripts in the Dataediting form*/ function dataEditingFunc(thisForm,submitIdValue){ - + windowName = 'formTarget' + (new Date().getTime()); if (thisForm.FormID.value!='secondRegression'){ @@ -336,7 +340,7 @@ function dataEditingFunc(thisForm,submitIdValue){ } else if (submitIdValue == "addRecord"){ - windowName = thisForm.RISet.value; + windowName = thisForm.RISet.value; var name = thisForm.identification.value; if (name != ""){ } @@ -352,7 +356,7 @@ function dataEditingFunc(thisForm,submitIdValue){ newWindow = open("",windowName,"menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=1,directories=1,width=900"); thisForm.target = windowName; - newWindow.focus(); + newWindow.focus(); thisForm.submitID.value = submitIdValue; thisForm.submit(); } @@ -394,7 +398,7 @@ function addRmvSelection(windowName, thisForm, addORrmv){ thisForm.target = windowName; thisForm.FormID.value = addORrmv; thisForm.submit(); - newWindow.focus(); + newWindow.focus(); } function batchSelection(thisForm){ @@ -424,7 +428,7 @@ function showTop10(formName, submitIdValue){ if ((submitIdValue == "markerRegression")||(submitIdValue == "compositeRegression")){ thisForm.topten.value = "topten"; } - + thisForm.submitID.value = submitIdValue; thisForm.submit(); } @@ -441,12 +445,12 @@ function showIndividualChromosome(formName, submitIdValue, ii){ } if (match == 0) return; - + windowName = 'formTarget' + (new Date().getTime()); newWindow = open("",windowName,"menubar=1,toolbar=1,location=1,resizable=1,status=1,scrollbars=1,directories=1,width=900"); newWindow.focus(); thisForm.target = windowName; - + if (submitIdValue == "showIntMap"){ thisForm.chromosomes.value = ii; } @@ -529,10 +533,10 @@ function dataWindow(form){ } -function xchange() { +function xchange() { var select = document.crossChoice.RISet; var value = select.options[select.selectedIndex].value; - + if (value !="BDAI") return; document.crossChoice.variance.checked = false; } @@ -580,97 +584,97 @@ function crossinfo2(){ function checkWidth(){ var width = document.getElementsByName('plotSize')[0].value - + if (width < 600) { alert("Plot size is too small - setting size to 600") document.getElementsByName('plotSize')[0].value = 600 - } + } } function changeLineColor(){ var lineColor = document.getElementsByName('lineColorSel')[0].value - + document.getElementsByName('lineColor')[0].value = lineColor } function changeLineSize(){ var lineSize = document.getElementsByName('lineSizeSel')[0].value - + document.getElementsByName('lineSize')[0].value = lineSize } function changeIdColor(){ var idColor = document.getElementsByName('idColorSel')[0].value - + document.getElementsByName('idColor')[0].value = idColor } function changeIdFont(){ var idFont = document.getElementsByName('idFontSel')[0].value - + document.getElementsByName('idFont')[0].value = idFont } function changeIdSize(){ var idSize = document.getElementsByName('idSizeSel')[0].value - + document.getElementsByName('idSize')[0].value = idSize } function changeSymbolColor(){ var symbolColor = document.getElementsByName('colorSel')[0].value - + document.getElementsByName('symbolColor')[0].value = symbolColor } function changeSymbol(){ var symbol = document.getElementsByName('symbolSel')[0].value - + document.getElementsByName('symbol')[0].value = symbol } function changeFilled(){ var filled = document.getElementsByName('fillSel')[0].value - + document.getElementsByName('filled')[0].value = filled } function changeSize(){ var symbolSize = document.getElementsByName('sizeSel')[0].value - + document.getElementsByName('symbolSize')[0].value = symbolSize } -function checkAll(thisForm){ +function checkAll(thisForm){ var length = thisForm.searchResult.length; for(var i = 0; i < length; i++) { thisForm.searchResult[i].checked = true; highlight(thisForm.searchResult[i]); } -} +} -function checkNone(thisForm){ +function checkNone(thisForm){ var length = thisForm.searchResult.length; for(var i = 0; i < length; i++) { thisForm.searchResult[i].checked = false; highlight(thisForm.searchResult[i]); } -} +} -function checkInvert(thisForm){ +function checkInvert(thisForm){ var length = thisForm.searchResult.length; for(var i = 0; i < length; i++) { thisForm.searchResult[i].checked = !(thisForm.searchResult[i].checked); highlight(thisForm.searchResult[i]); } -} +} /*Not used anymore*/ -function checkTraits2(thisForm){ +function checkTraits2(thisForm){ var length = thisForm.searchResult.length; var category = thisForm.selectmenu.value; for(var i = 0; i < length; i++) @@ -720,18 +724,18 @@ function checkTraits2(thisForm){ else {} } -} +} function checkNumeric(field,limit,resetvalue,compares,fdname) { - pattern = /^-?[0-9]*\.?[0-9]*$/; + pattern = /^-?[0-9]*\.?[0-9]*$/; if(pattern.test(field.value)==false) { alert("Not numeric in " + fdname); field.value = resetvalue; } - else + else { if (compares == 'gthan') { if(field.value > limit) @@ -748,7 +752,7 @@ function checkNumeric(field,limit,resetvalue,compares,fdname) } } -function checkTraits(thisForm){ +function checkTraits(thisForm){ var length = thisForm.searchResult.length; var andor = thisForm.selectandor.value; var gthan = parseFloat(thisForm.selectgt.value); @@ -780,7 +784,7 @@ function checkTraits(thisForm){ } -function checkPM(thisForm){ +function checkPM(thisForm){ var length = thisForm.searchResult.length; for(var i = 0; i < length; i++) { @@ -792,8 +796,8 @@ function checkPM(thisForm){ {thisForm.searchResult[i].checked = false;} highlight(thisForm.searchResult[i]); } -} -function checkMM(thisForm){ +} +function checkMM(thisForm){ var length = thisForm.searchResult.length; for(var i = 0; i < length; i++) { @@ -804,14 +808,14 @@ function checkMM(thisForm){ {thisForm.searchResult[i].checked = false;} highlight(thisForm.searchResult[i]); } -} +} -function directPermuAlert(thisForm){ - if (thisForm.directPermuCheckbox.checked){ - alert("Interaction permutation will take long time to compute.\n Check this box only when necessary."); +function directPermuAlert(thisForm){ + if (thisForm.directPermuCheckbox.checked){ + alert("Interaction permutation will take long time to compute.\n Check this box only when necessary."); } -} +} function cliqueDatabase(pid){ var windowName = 'clique'; @@ -869,7 +873,7 @@ function snpbrowser_function_refresh() { for (var i=1; i - {{ thisTrait.name.upper() }} + - + + {{ thisTrait.name.upper() }} + diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 88a6f6a1..b128f425 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -17,3 +17,7 @@ def index_page(): def search(): the_search = search_results.SearchResultPage(request.args) return render_template("search_result_page.html", **the_search.__dict__) + +@app.route("/showDatabaseBXD") +def showDatabaseBXD(): + return None -- cgit v1.2.3 From c3169069206124ec79c70c18f97290a6672428a3 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Thu, 18 Oct 2012 16:16:41 -0500 Subject: Converted selectDatasetMenu.js code to coffeescript as dataset_select_menu.coffee Copied the menu variables from selectDatasetMenu.js as dataset_select_items.js --- web/javascript/selectDatasetMenu.js | 0 .../static/new/javascript/dataset_select_items.js | 773 +++++++++++++++++++++ .../new/javascript/dataset_select_menu.coffee | 370 ++++++++++ .../static/new/javascript/dataset_select_menu.js | 363 ++++++++++ .../wqflask/static/new/javascript/validation.js | 51 ++ wqflask/wqflask/templates/new_index_page.html | 4 +- 6 files changed, 1559 insertions(+), 2 deletions(-) mode change 100755 => 100644 web/javascript/selectDatasetMenu.js create mode 100755 wqflask/wqflask/static/new/javascript/dataset_select_items.js create mode 100644 wqflask/wqflask/static/new/javascript/dataset_select_menu.coffee create mode 100644 wqflask/wqflask/static/new/javascript/dataset_select_menu.js create mode 100644 wqflask/wqflask/static/new/javascript/validation.js (limited to 'web/javascript') diff --git a/web/javascript/selectDatasetMenu.js b/web/javascript/selectDatasetMenu.js old mode 100755 new mode 100644 diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_items.js b/wqflask/wqflask/static/new/javascript/dataset_select_items.js new file mode 100755 index 00000000..11be18cc --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/dataset_select_items.js @@ -0,0 +1,773 @@ +var sArr = [ +{txt:'',val:''}, +{txt:'Human',val:'human'}, +{txt:'Macaque monkey',val:'macaque monkey'}, +{txt:'Mouse',val:'mouse'}, +{txt:'Rat',val:'rat'}, +{txt:'Drosophila',val:'drosophila'}, +{txt:'Arabidopsis thaliana',val:'arabidopsis'}, +{txt:'Barley',val:'barley'}, +{txt:'Soybean',val:'soybean'}, +{txt:'Tomato',val:'tomato'}, +{txt:'All Species',val:'All Species'}]; + +var gArr = [ +{txt:'',val:''}, +{txt:'AD Cases & Controls (Liang)',val:'AD-cases-controls'}, +{txt:'AD Cases & Controls (Myers)',val:'AD-cases-controls-Myers'}, +{txt:'AKXD',val:'AKXD'}, +{txt:'AXB/BXA',val:'AXBXA'}, +{txt:'B6BTBRF2',val:'B6BTBRF2'}, +{txt:'B6D2F2',val:'B6D2F2'}, +{txt:'BayXSha',val:'BayXSha'}, +{txt:'BDF2 UCLA',val:'BDF2-1999'}, +{txt:'BDF2-2005',val:'BDF2-2005'}, +{txt:'BHF2 (Apoe Null) UCLA',val:'BHF2'}, +{txt:'BH/HB F2 UCLA',val:'BHHBF2'}, +{txt:'BXD',val:'BXD'}, +{txt:'BXH',val:'BXH'}, +{txt:'CANDLE',val:'CANDLE'}, +{txt:'CEPH Families',val:'CEPH-2004'}, +{txt:'ColXBur',val:'ColXBur'}, +{txt:'ColXCvi',val:'ColXCvi'}, +{txt:'CastB6/B6Cast F2 UCLA',val:'CTB6F2'}, +{txt:'CXB',val:'CXB'}, +{txt:'Drosophila Genetic Reference Panel',val:'DGRP'}, +{txt:'Harvard Brain Tissue Resource Center',val:'HB'}, +{txt:'Human Liver Cohort',val:'HLC'}, +{txt:'Heterogeneous Stock',val:'HS'}, +{txt:'Heterogeneous Stock Collaborative Cross',val:'HS-CC'}, +{txt:'KIN/YSM',val:'HSB'}, +{txt:'HXB/BXH',val:'HXBBXH'}, +{txt:'J12XJ58F2',val:'J12XJ58F2'}, +{txt:'LXP',val:'LXP'}, +{txt:'LXS',val:'LXS'}, +{txt:'Macaca fasicularis (Cynomolgus monkey)',val:'Macaca-fasicularis'}, +{txt:'Mouse Diversity Panel',val:'MDP'}, +{txt:'NZB/FVB N2 NCI',val:'NZBXFVB-N2'}, +{txt:'Oregon-R x 2b3',val:'Oregon-R_x_2b3'}, +{txt:'QSM',val:'QSM'}, +{txt:'UIOWA SRxSHRSP F2',val:'SRxSHRSPF2'}, +{txt:'SXM',val:'SXM'}, +{txt:'All Groups',val:'all groups'}]; + +var tArr = [ +{txt:'',val:''}, +{txt:'Adipose mRNA',val:'Adipose'}, +{txt:'Adrenal Gland mRNA',val:'Adrenal Gland'}, +{txt:'Amygdala mRNA',val:'Amygdala'}, +{txt:'Brain mRNA',val:'Brain'}, +{txt:'Cartilage mRNA',val:'Cartilage'}, +{txt:'Caudal Ganglionic Eminence mRNA',val:'Caudal Ganglionic Eminence'}, +{txt:'Cerebellar Cortex mRNA',val:'Cerebellar Cortex'}, +{txt:'Cerebellum mRNA',val:'Cerebellum'}, +{txt:'Diencephalon mRNA',val:'Diencephalon'}, +{txt:'Dorsal Thalamus mRNA',val:'Dorsal Thalamus'}, +{txt:'Dorsolateral Prefrontal Cortex mRNA',val:'Dorsolateral Prefrontal Cortex'}, +{txt:'Embryo mRNA',val:'Embryo'}, +{txt:'Eye mRNA',val:'Eye'}, +{txt:'Frontal Cerebral Wall mRNA',val:'Frontal Cerebral Wall'}, +{txt:'Heart mRNA',val:'Heart'}, +{txt:'Hematopoietic Cells mRNA',val:'Hematopoietic Cells'}, +{txt:'Hippocampus mRNA',val:'Hippocampus'}, +{txt:'Hypothalamus mRNA',val:'Hypothalamus'}, +{txt:'Inferior Temporal Cortex mRNA',val:'Inferior Temporal Cortex'}, +{txt:'Kidney mRNA',val:'Kidney'}, +{txt:'Lateral Ganglionic Eminence mRNA',val:'Lateral Ganglionic Eminence'}, +{txt:'Leaf mRNA',val:'Leaf'}, +{txt:'Leucocytes mRNA',val:'Leucocytes'}, +{txt:'Liver mRNA',val:'Liver'}, +{txt:'Lung mRNA',val:'Lung'}, +{txt:'Lymphoblast B-cell mRNA',val:'Lymphoblast B-cell'}, +{txt:'Mammary Tumors mRNA',val:'Mammary Tumors'}, +{txt:'Medial Ganglionic Eminence mRNA',val:'Medial Ganglionic Eminence'}, +{txt:'Medial Prefrontal Cortex mRNA',val:'Medial Prefrontal Cortex'}, +{txt:'Mediodorsal Nucleus of Thalamus mRNA',val:'Mediodorsal Nucleus of Thalamus'}, +{txt:'Midbrain mRNA',val:'Midbrain'}, +{txt:'Muscle mRNA',val:'Muscle'}, +{txt:'Neocortex mRNA',val:'Neocortex'}, +{txt:'Newborn Cord Blood mRNA',val:'Newborn Cord Blood'}, +{txt:'Nucleus Accumbens mRNA',val:'Nucleus Accumbens'}, +{txt:'Occipital Cerebral Wall mRNA',val:'Occipital Cerebral Wall'}, +{txt:'Orbital Prefrontal Cortex mRNA',val:'Orbital Prefrontal Cortex'}, +{txt:'Parietal Cerebral Wall mRNA',val:'Parietal Cerebral Wall'}, +{txt:'Peritoneal Fat mRNA',val:'Peritoneal Fat'}, +{txt:'Posterior Inferior Parietal Cortex mRNA',val:'Posterior Inferior Parietal Cortex'}, +{txt:'Posterior Superior Temporal Cortex mRNA',val:'Posterior Superior Temporal Cortex'}, +{txt:'Prefrontal Cortex mRNA',val:'Prefrontal Cortex'}, +{txt:'Primary Auditory (A1) Cortex mRNA',val:'Primary Auditory (A1) Cortex'}, +{txt:'Primary Motor (M1) Cortex mRNA',val:'Primary Motor (M1) Cortex'}, +{txt:'Primary Somatosensory (S1) Cortex mRNA',val:'Primary Somatosensory (S1) Cortex'}, +{txt:'Primary Visual Cortex mRNA',val:'Primary Visual Cortex'}, +{txt:'Retina mRNA',val:'Retina'}, +{txt:'Spleen mRNA',val:'Spleen'}, +{txt:'Striatum mRNA',val:'Striatum'}, +{txt:'T Cell (helper) mRNA',val:'T Cell (helper)'}, +{txt:'T Cell (regulatory) mRNA',val:'T Cell (regulatory)'}, +{txt:'Temporal Cerebral Wall mRNA',val:'Temporal Cerebral Wall'}, +{txt:'Thymus mRNA',val:'Thymus'}, +{txt:'Upper (Rostral) Rhombic Lip mRNA',val:'Upper (Rostral) Rhombic Lip'}, +{txt:'Ventral Forebrain mRNA',val:'Ventral Forebrain'}, +{txt:'Ventral Tegmental Area mRNA',val:'Ventral Tegmental Area'}, +{txt:'Ventrolateral Prefrontal Cortex mRNA',val:'Ventrolateral Prefrontal Cortex'}, +{txt:'Whole Body mRNA',val:'Whole Body'}, +{txt:'Phenotypes',val:'Phenotypes'}, +{txt:'Genotypes',val:'Genotypes'}]; + +var dArr = [ +{txt:'',val:''}, +{txt:'GSE15222 Human Brain Alzheimer Myers (Apr09) RankInv',val:'GSE15222_F_A_RI_0409'}, +{txt:'GSE15222 Human Brain Normal Myers (Apr09) RankInv',val:'GSE15222_F_N_RI_0409'}, +{txt:'Normal HEI Retina (April 2010) RankInv',val:'G2NEI_ILM_Retina_BXD_RI0410'}, +{txt:'Full HEI Retina (April 2010) RankInv',val:'Illum_Retina_BXD_RankInv0410'}, +{txt:'ONC HEI Retina (April 2012) RankInv',val:'ONCRetILM6_0412'}, +{txt:'B6D2 ONC Retina (April 2012) RankInv **',val:'B6D2ONCILM_0412'}, +{txt:'INIA Macaca fasicularis Nucleus Accumbens (Jan10) RMA **',val:'INIA_MacFas_Ac_RMA_0110'}, +{txt:'UCLA CTB6/B6CTF2 Liver (2005) mlratio',val:'UCLA_CTB6B6CTF2_LIVER_2005'}, +{txt:'UCLA CTB6/B6CTF2 Adipose (2005) mlratio',val:'UCLA_CTB6B6CTF2_ADIPOSE_2005'}, +{txt:'UCLA CTB6/B6CTF2 Brain (2005) mlratio',val:'UCLA_CTB6B6CTF2_BRAIN_2005'}, +{txt:'UCLA CTB6/B6CTF2 Muscle (2005) mlratio',val:'UCLA_CTB6B6CTF2_MUSCLE_2005'}, +{txt:'INIA Macaca fasicularis Hippocampus (Jan10) RMA **',val:'INIA_MacFas_Hc_RMA_0110'}, +{txt:'UCLA CTB6B6CTF2 Muscle Female mlratio **',val:'UCLA_CTB6B6CTF2_MUSCLE_FEMALE'}, +{txt:'INIA Macaca fasicularis Amygdala (Jan10) RMA **',val:'INIA_MacFas_AMG_RMA_0110'}, +{txt:'UCLA CTB6B6CTF2 Adipose Female mlratio **',val:'UCLA_CTB6B6CTF2_ADIPOSE_FEMALE'}, +{txt:'UCLA CTB6B6CTF2 Brain Female mlratio **',val:'UCLA_CTB6B6CTF2_BRAIN_FEMALE'}, +{txt:'UCLA CTB6B6CTF2 Liver Female mlratio **',val:'UCLA_CTB6B6CTF2_LIVER_FEMALE'}, +{txt:'VU BXD Midbrain Agilent SurePrint G3 Mouse GE (May12) Quantile **',val:'VUBXDMouseMidBrainQ0512'}, +{txt:'GSE16780 UCLA Hybrid MDP Liver Affy HT M430A (Sep11) RMA',val:'GSE16780_UCLA_ML0911'}, +{txt:'EPFL/LISP BXD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA **',val:'EPFLMouseMuscleRMA1211'}, +{txt:'EPFL/LISP BXD HFD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA **',val:'EPFLMouseMuscleHFDRMA1211'}, +{txt:'EPFL/LISP BXD CD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA **',val:'EPFLMouseMuscleCDRMA1211'}, +{txt:'BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov11) RankInv **',val:'DevStriatum_ILM6.2P14RInv_1111'}, +{txt:'BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov11) RankInv **',val:'DevStriatum_ILM6.2P3RInv_1111'}, +{txt:'BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov11) RankInv',val:'DevNeocortex_ILM6.2P14RInv_1111'}, +{txt:'BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv',val:'DevNeocortex_ILM6.2P3RInv_1111'}, +{txt:'G2 HEI ONC Retina Illumina V6.2 (Sep11) RankInv **',val:'G2HEIONCRetILM6_0911'}, +{txt:'HEI ONC vs Control Retina Illumina V6.2 (Sep11) RankInv **',val:'HEIONCvsCRetILM6_0911'}, +{txt:'JAX Liver Affy M430 2.0 (Jul11) MDP',val:'JAX_CSB_L_0711'}, +{txt:'JAX Liver HF Affy M430 2.0 (Jul11) MDP',val:'JAX_CSB_L_HF_0711'}, +{txt:'JAX Liver 6C Affy M430 2.0 (Jul11) MDP',val:'JAX_CSB_L_6C_0711'}, +{txt:'CANDLE Newborn Cord ILMv6.3 (Jun11) QUANT **',val:'CANDLE_NB_0711'}, +{txt:'KIN/YSM Human AMY Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_AMY_0711'}, +{txt:'KIN/YSM Human A1C Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_A1C_0711'}, +{txt:'KIN/YSM Human TC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_TC_0711'}, +{txt:'KIN/YSM Human CBC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_CBC_0711'}, +{txt:'KIN/YSM Human CGE Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_CGE_0711'}, +{txt:'KIN/YSM Human FC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_FC_0711'}, +{txt:'KIN/YSM Human S1C Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_S1C_0711'}, +{txt:'KIN/YSM Human STR Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_STR_0711'}, +{txt:'KIN/YSM Human URL Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_URL_0711'}, +{txt:'KIN/YSM Human V1C Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_V1C_0711'}, +{txt:'KIN/YSM Human VF Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_VF_0711'}, +{txt:'KIN/YSM Human VFC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_VFC_0711'}, +{txt:'KIN/YSM Human STC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_STC_0711'}, +{txt:'KIN/YSM Human ITC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_ITC_0711'}, +{txt:'KIN/YSM Human LGE Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_LGE_0711'}, +{txt:'KIN/YSM Human M1C Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_M1C_0711'}, +{txt:'KIN/YSM Human MD Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_MD_0711'}, +{txt:'KIN/YSM Human IPC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_IPC_0711'}, +{txt:'KIN/YSM Human HIP Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_HIP_0711'}, +{txt:'KIN/YSM Human MFC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_MFC_0711'}, +{txt:'KIN/YSM Human DFC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_DFC_0711'}, +{txt:'KIN/YSM Human DIE Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_DIE_0711'}, +{txt:'KIN/YSM Human MGE Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_MGE_0711'}, +{txt:'KIN/YSM Human DTH Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_DTH_0711'}, +{txt:'KIN/YSM Human PC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_PC_0711'}, +{txt:'KIN/YSM Human OC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_OC_0711'}, +{txt:'KIN/YSM Human OFC Affy Hu-Exon 1.0 ST (Jul11) Quantile **',val:'KIN_YSM_OFC_0711'}, +{txt:'HBTRC-MLC Human Cerebellum Agilent (Jun11) mlratio',val:'HBTRC-MLC_0611'}, +{txt:'HBTRC-MLC Human Cerebellum Agilent Normal (Jun11) mlratio',val:'HBTRC-MLC_N_0611'}, +{txt:'HBTRC-MLC Human Prefrontal Cortex Agilent (Jun11) mlratio',val:'HBTRC-MLPFC_0611'}, +{txt:'HBTRC-MLC Human Cerebellum Agilent AD (Jun11) mlratio',val:'HBTRC-MLC_AD_0611'}, +{txt:'HBTRC-MLC Human Visual Cortex Agilent (Jun11) mlratio',val:'HBTRC-MLVC_0611'}, +{txt:'HBTRC-MLC Human Prefrontal Cortex Agilent Normal (Jun11) mlratio',val:'HBTRC-MLPFC_N_0611'}, +{txt:'HBTRC-MLC Human Prefrontal Cortex Agilent AD (Jun11) mlratio',val:'HBTRC-MLPFC_AD_0611'}, +{txt:'HBTRC-MLC Human Cerebellum Agilent HD (Jun11) mlratio',val:'HBTRC-MLC_HD_0611'}, +{txt:'HBTRC-MLC Human Visual Cortex Agilent Normal (Jun11) mlratio',val:'HBTRC-MLVC_N_0611'}, +{txt:'HBTRC-MLC Human Prefrontal Cortex Agilent HD (Jun11) mlratio',val:'HBTRC-MLPFC_HD_0611'}, +{txt:'HBTRC-MLC Human Visual Cortex Agilent AD (Jun11) mlratio',val:'HBTRC-MLVC_AD_0611'}, +{txt:'HBTRC-MLC Human Visual Cortex Agilent HD (Jun11) mlratio',val:'HBTRC-MLVC_HD_0611'}, +{txt:'INIA Amygdala Cohort Affy MoGene 1.0 ST (Mar11) RMA',val:'INIA_AmgCoh_0311'}, +{txt:'INIA Amygdala Affy MoGene 1.0 ST (Nov10) RMA',val:'INIA_Amg_BLA_RMA_1110'}, +{txt:'INIA Amygdala Affy MoGene 1.0 ST (Nov10) RMA Male',val:'INIA_Amg_BLA_RMA_M_1110'}, +{txt:'INIA Amygdala Affy MoGene 1.0 ST (Nov10) RMA Female',val:'INIA_Amg_BLA_RMA_F_1110'}, +{txt:'GSE9588 Human Liver Normal (Mar11) Both Sexes',val:'HLC_0311'}, +{txt:'GSE9588 Human Liver Normal (Mar11) Males',val:'HLCM_0311'}, +{txt:'HZI Thelp M430v2 (Feb11) RMA',val:'RTHC_0211_R'}, +{txt:'GSE5281 Human Brain Normal Full Liang (Jul09) RMA',val:'GSE5281_F_RMA_N_0709'}, +{txt:'GSE5281 Human Brain Alzheimer Full Liang (Jul09) RMA',val:'GSE5281_F_RMA_Alzh_0709'}, +{txt:'OHSU HS-CC Striatum ILM6v1 (Feb11) RankInv',val:'OHSU_HS-CC_ILMStr_0211'}, +{txt:'NCSU Drosophila Whole Body (Jan11) RMA',val:'NCSU_DrosWB_LC_RMA_0111'}, +{txt:'UNC Agilent G4121A Liver LOWESS Stanford (Jan06) Females',val:'LV_G_0106_F'}, +{txt:'UNC Agilent G4121A Liver LOWESS Stanford (Jan06) Males',val:'LV_G_0106_M'}, +{txt:'UNC Agilent G4121A Liver LOWESS Stanford (Jan06) Both Sexes',val:'LV_G_0106_B'}, +{txt:'GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Females **',val:'GenEx_BXD_liverSal_RMA_F_0211'}, +{txt:'GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Males **',val:'GenEx_BXD_liverSal_RMA_M_0211'}, +{txt:'GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Both Sexes **',val:'GenEx_BXD_liverSal_RMA_0211'}, +{txt:'GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Females **',val:'GenEx_BXD_liverEt_RMA_F_0211'}, +{txt:'GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Males **',val:'GenEx_BXD_liverEt_RMA_M_0211'}, +{txt:'GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Both Sexes **',val:'GenEx_BXD_liverEt_RMA_0211'}, +{txt:'SUH BXD Liver Affy Mouse Gene 1.0 ST (Jun11) RMA **',val:'SUH_Liv_RMA_0611'}, +{txt:'HQF BXD Striatum ILM6.1 (Dec10v2) RankInv',val:'UTHSC_Striatum_RankInv_1210'}, +{txt:'HQF BXD Striatum ILM6.1 (Dec10) RankInv',val:'UTHSC_Str_RankInv_1210'}, +{txt:'HQF BXD Neocortex ILM6v1.1 (Dec10v2) RankInv',val:'HQFNeoc_1210v2_RankInv'}, +{txt:'UTHSC Affy MoGene 1.0 ST Spleen (Dec10) RMA',val:'UTHSC_SPL_RMA_1210'}, +{txt:'HQF BXD Neocortex ILM6v1.1 (Dec10) RankInv',val:'HQFNeoc_1210_RankInv'}, +{txt:'INIA Hypothalamus Affy MoGene 1.0 ST (Nov10)',val:'INIA_Hyp_RMA_1110'}, +{txt:'INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) Male',val:'INIA_Hyp_M_RMA_1110'}, +{txt:'INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) Female',val:'INIA_Hyp_F_RMA_1110'}, +{txt:'UTHSC Affy MoGene 1.0 ST Spleen (Oct10) RMA',val:'UTHSC_SPL_RMA_1010'}, +{txt:'Hippocampus Consortium M430v2 (Jun06) RMA MDP',val:'HC_M2_0606_MDP'}, +{txt:'UMUTAffy Hippocampus Exon (Feb09) RMA MDP',val:'UMUTAffyExon_0209_RMA_MDP'}, +{txt:'OX UK HS ILM6v1.1 Lung (May 2010) RankInv',val:'OXUKHS_ILMLung_RI0510'}, +{txt:'OX UK HS ILM6v1.1 Liver (May 2010) RankInv',val:'OXUKHS_ILMLiver_RI0510'}, +{txt:'OX UK HS ILM6v1.1 Hippocampus (May 2010) RankInv',val:'OXUKHS_ILMHipp_RI0510'}, +{txt:'INIA Macaca fasicularis Prefrontal Cortex (Jan10) RMA **',val:'INIA_MacFas_Pf_RMA_0110'}, +{txt:'INIA Macaca fasicularis Brain (Jan10) RMA **',val:'INIA_MacFas_brain_RMA_0110'}, +{txt:'UAB Whole body D.m. mRNA control (Oct09) RMA',val:'UAB_DrosWB_LC_RMA_1009'}, +{txt:'UAB Whole body D.m. mRNA lead (pbAc) (Oct09) RMA',val:'UAB_DrosWB_LE_RMA_1009'}, +{txt:'UMCG Stem Cells ILM6v1.1 (Apr09) original',val:'UMCG_0907_HemaStem_ori'}, +{txt:'UMCG Stem Cells ILM6v1.1 (Apr09) transformed',val:'UMCG_0907_HemaStem'}, +{txt:'UMCG Progenitor Cells ILM6v1.1 (Apr09) original',val:'UMCG_0907_Pro_ori'}, +{txt:'UMCG Progenitor Cells ILM6v1.1 (Apr09) transformed',val:'UMCG_0907_Pro'}, +{txt:'UMCG Erythroid Cells ILM6v1.1 (Apr09) original',val:'UMCG_0907_Eryth_ori'}, +{txt:'UMCG Erythroid Cells ILM6v1.1 (Apr09) transformed',val:'UMCG_0907_Eryth'}, +{txt:'UMCG Myeloid Cells ILM6v1.1 (Apr09) original',val:'UMCG_0907_Myeloid_ori'}, +{txt:'UMCG Myeloid Cells ILM6v1.1 (Apr09) transformed',val:'UMCG_0907_Myeloid'}, +{txt:'UTHSC CEPH B-cells Illumina (Sep09) RankInv',val:'UT_CEPH_RankInv0909'}, +{txt:'Mouse kidney M430v2 Female (Aug06) RMA',val:'MA_M2F_0706_R'}, +{txt:'Mouse kidney M430v2 Male (Aug06) RMA',val:'MA_M2M_0706_R'}, +{txt:'Barley1 Leaf INOC TTKS (Aug09) RMA',val:'B1LI0809R'}, +{txt:'Barley1 Leaf INOC TTKS (Aug09) MAS5',val:'B1LI0809M5'}, +{txt:'Barley1 Leaf MOCK TTKS (Aug09) MAS5',val:'B1MI0809M5'}, +{txt:'Barley1 Leaf MOCK TTKS (Aug09) RMA',val:'B1MI0809R'}, +{txt:'GSE15222 Human Brain Myers (Apr09) RankInv',val:'GSE15222_F_RI_0409'}, +{txt:'GSE5281 Human Brain Full Liang (Jul09) RMA',val:'GSE5281_F_RMA0709'}, +{txt:'GSE5281 Human Brain Best 102 Liang (Jul09) RMA',val:'GSE5281_RMA0709'}, +{txt:'UT Hippocampus Affy RaEx 1.0 Exon (Jul09) RMA',val:'UT_HippRatEx_RMA_0709'}, +{txt:'VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **',val:'VCUEtOH_0609_R'}, +{txt:'VCU BXD VTA Sal M430 2.0 (Jun09) RMA **',val:'VCUSal_0609_R'}, +{txt:'VCU BXD VTA Et vs Sal M430 2.0 (Jun09) Sscore **',val:'VCUEtvsSal_0609_R'}, +{txt:'IoP Affy MOE 430v2 Spleen (May09) RMA',val:'IoP_SPL_RMA_0509'}, +{txt:'NCI Mammary M430v2 (Apr09) RMA',val:'NCI_Mam_Tum_RMA_0409'}, +{txt:'NCI Mammary LMT miRNA v2 (Apr09) RMA',val:'NCI_Agil_Mam_Tum_RMA_0409'}, +{txt:'MDC/CAS/UCL Liver 230v2 (Dec08) RMA',val:'HXB_Liver_1208'}, +{txt:'MDC/CAS/UCL Heart 230_V2 (Dec08) RMA',val:'HXB_Heart_1208'}, +{txt:'MDC/CAS/UCL Adrenal 230A (Dec08) RMA',val:'HXB_Adrenal_1208'}, +{txt:'UWA Illumina PBL (Nov08) RSN **',val:'Illum_BXD_PBL_1108'}, +{txt:'UWA Illumina Thymus (Nov08) RSN **',val:'Illum_BXD_Thy_1108'}, +{txt:'UWA Illumina Spleen (Nov08) RSN **',val:'Illum_BXD_Spl_1108'}, +{txt:'Monks CEPH B-cells Agilent (Dec04) Log10Ratio',val:'Human_1008'}, +{txt:'UTK Spleen ILM6.1 (Jan10) VST',val:'UTK_BXDSpl_VST_0110'}, +{txt:'Eye AXBXA Illumina V6.2(Oct08) RankInv Beta',val:'Eye_AXBXA_1008_RankInv'}, +{txt:'Eye M430v2 (Sep08) RMA',val:'Eye_M2_0908_R'}, +{txt:'Eye M430v2 Mutant Gpnmb (Sep08) RMA **',val:'Eye_M2_0908_R_NB'}, +{txt:'Eye M430v2 WT Gpnmb (Sep08) RMA **',val:'Eye_M2_0908_R_ND'}, +{txt:'Eye M430v2 Mutant Tyrp1 (Sep08) RMA **',val:'Eye_M2_0908_R_MT'}, +{txt:'Eye M430v2 WT WT (Sep08) RMA **',val:'Eye_M2_0908_WTWT'}, +{txt:'Eye M430v2 WT Tyrp1 (Sep08) RMA **',val:'Eye_M2_0908_R_WT'}, +{txt:'BXD Glaucoma Affy M430 2.0 Trial (Sep11) RMA **',val:'BXD_GLA_0911'}, +{txt:'UCLA BXH and BXD Cartilage v2',val:'UCLA_BXHBXD_CARTILAGE_V2'}, +{txt:'UCLA BXD and BXH Cartilage v2',val:'UCLA_BXDBXH_CARTILAGE_V2'}, +{txt:'UCLA BXD and BXH Cartilage',val:'UCLA_BXDBXH_CARTILAGE'}, +{txt:'UCLA BXH and BXD Cartilage',val:'UCLA_BXHBXD_CARTILAGE'}, +{txt:'UCLA BHF2 Brain Male mlratio',val:'UCLA_BHF2_BRAIN_MALE'}, +{txt:'UCLA BHF2 Brain Female mlratio',val:'UCLA_BHF2_BRAIN_FEMALE'}, +{txt:'UCLA BHF2 Adipose Female mlratio',val:'UCLA_BHF2_ADIPOSE_FEMALE'}, +{txt:'UCLA BHF2 Adipose Male mlratio',val:'UCLA_BHF2_ADIPOSE_MALE'}, +{txt:'UCLA CTB6B6CTF2 Muscle Male mlratio **',val:'UCLA_CTB6B6CTF2_MUSCLE_MALE'}, +{txt:'UCLA CTB6B6CTF2 Liver Male mlratio **',val:'UCLA_CTB6B6CTF2_LIVER_MALE'}, +{txt:'UCLA CTB6B6CTF2 Brain Male mlratio **',val:'UCLA_CTB6B6CTF2_BRAIN_MALE'}, +{txt:'UCLA CTB6B6CTF2 Adipose Male mlratio **',val:'UCLA_CTB6B6CTF2_ADIPOSE_MALE'}, +{txt:'UCLA BHF2 Liver Male mlratio',val:'UCLA_BHF2_LIVER_MALE'}, +{txt:'UCLA BHF2 Liver Female mlratio',val:'UCLA_BHF2_LIVER_FEMALE'}, +{txt:'UCLA BHHBF2 Brain Female Only',val:'UCLA_BHHBF2_BRAIN_FEMALE'}, +{txt:'UCLA BHHBF2 Liver Female Only',val:'UCLA_BHHBF2_LIVER_FEMALE'}, +{txt:'UCLA BHHBF2 Muscle Male Only',val:'UCLA_BHHBF2_MUSCLE_MALE'}, +{txt:'UCLA BHHBF2 Muscle Female Only',val:'UCLA_BHHBF2_MUSCLE_FEMALE'}, +{txt:'UCLA BHHBF2 Liver Male Only',val:'UCLA_BHHBF2_LIVER_MALE'}, +{txt:'UCLA BHHBF2 Brain Male Only',val:'UCLA_BHHBF2_BRAIN_MALE'}, +{txt:'UCLA BHHBF2 Adipose Female Only',val:'UCLA_BHHBF2_ADIPOSE_FEMALE'}, +{txt:'UCLA BHHBF2 Adipose Male Only',val:'UCLA_BHHBF2_ADIPOSE_MALE'}, +{txt:'UCLA BHF2 Muscle Female mlratio **',val:'UCLA_BHF2_MUSCLE_FEMALE'}, +{txt:'UCLA BHF2 Muscle Male mlratio **',val:'UCLA_BHF2_MUSCLE_MALE'}, +{txt:'UCLA BXH Cartilage',val:'UCLA_BXH_CARTILAGE'}, +{txt:'UCLA BXD Cartilage',val:'UCLA_BXD_CARTILAGE'}, +{txt:'UCLA BHHBF2 Adipose (2005) mlratio **',val:'UCLA_BHHBF2_ADIPOSE_2005'}, +{txt:'UCLA BHHBF2 Brain (2005) mlratio **',val:'UCLA_BHHBF2_BRAIN_2005'}, +{txt:'UCLA BHHBF2 Liver (2005) mlratio **',val:'UCLA_BHHBF2_LIVER_2005'}, +{txt:'UCLA BHHBF2 Muscle (2005) mlratio **',val:'UCLA_BHHBF2_MUSCLE_2005'}, +{txt:'UCLA BHF2 Adipose (June05) mlratio',val:'UCLA_BHF2_ADIPOSE_0605'}, +{txt:'UCLA BDF2 Liver (1999) mlratio',val:'UCLA_BDF2_LIVER_1999'}, +{txt:'UCLA BHF2 Muscle (June05) mlratio **',val:'UCLA_BHF2_MUSCLE_0605'}, +{txt:'UCLA BHF2 Brain (June05) mlratio',val:'UCLA_BHF2_BRAIN_0605'}, +{txt:'UCLA BHF2 Liver (June05) mlratio',val:'UCLA_BHF2_LIVER_0605'}, +{txt:'HZI Lung M430v2 (Apr08) RMA',val:'HZI_0408_R'}, +{txt:'HZI Lung M430v2 (Apr08) MAS5',val:'HZI_0408_M'}, +{txt:'HQF BXD Neocortex ILM6v1.1 (Feb08) RankInv',val:'HQFNeoc_0208_RankInv'}, +{txt:'VCU BXD NA Sal M430 2.0 (Oct07) RMA',val:'VCUSalo_1007_R'}, +{txt:'VCU BXD NA EtOH M430 2.0 (Oct07) RMA **',val:'VCUEtOH_1007_R'}, +{txt:'VCU BXD NA Et vs Sal M430 2.0 (Oct07) Sscore **',val:'VCUSal_1007_R'}, +{txt:'Stuart Spleen M430v2 (Nov07) RMA',val:'STSPL_1107_R'}, +{txt:'HQF BXD Striatum ILM6.1 (Nov07) RankInv',val:'UTHSC_1107_RankInv'}, +{txt:'Hippocampus Illumina (Aug07) LOESS',val:'Illum_LXS_Hipp_loess0807'}, +{txt:'Hippocampus Illumina (Aug07) LOESS_NB',val:'Illum_LXS_Hipp_loess_nb0807'}, +{txt:'Hippocampus Illumina (Aug07) QUANT',val:'Illum_LXS_Hipp_quant0807'}, +{txt:'Hippocampus Illumina (Aug07) QUANT_NB',val:'Illum_LXS_Hipp_quant_nb0807'}, +{txt:'Hippocampus Illumina (Aug07) RSN',val:'Illum_LXS_Hipp_rsn0807'}, +{txt:'Hippocampus Illumina (Aug07) RSN_NB',val:'Illum_LXS_Hipp_rsn_nb0807'}, +{txt:'VCU BXD PFC EtOH M430 2.0 (Dec06) RMA',val:'VCUEtOH_1206_R'}, +{txt:'VCU BXD PFC Sal M430 2.0 (Dec06) RMA',val:'VCUSal_1206_R'}, +{txt:'VCU BXD PFC Et vs Sal M430 2.0 (Dec06) Sscore',val:'VCUSal_1006_R'}, +{txt:'VCU BXD PFC CIE Air M430 2.0 (Jan11) RMA **',val:'VCU_PF_Air_0111_R'}, +{txt:'VCU BXD PFC CIE EtOH M430 2.0 (Jan11) RMA **',val:'VCU_PF_Et_0111_R'}, +{txt:'VCU BXD PFC EtOH vs CIE Air M430 2.0 (Jan11) Sscore **',val:'VCU_PF_AvE_0111_Ss'}, +{txt:'Hippocampus Illumina (May07) RankInv',val:'Hipp_Illumina_RankInv_0507'}, +{txt:'VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **',val:'VCUEtOH_0806_R'}, +{txt:'VCU LXS PFC Sal M430A 2.0 (Aug06) RMA',val:'VCUSal_0806_R'}, +{txt:'VCU LXS PFC Et vs Sal M430A 2.0 (Aug06) Sscore **',val:'VCUEt_vs_Sal_0806_R'}, +{txt:'Barley1 Embryo gcRMA SCRI (Dec06)',val:'B139_K_1206_R'}, +{txt:'Barley1 Leaf MAS 5.0 SCRI (Dec06)',val:'B30_K_1206_M'}, +{txt:'Barley1 Leaf gcRMAn SCRI (Dec06)',val:'B30_K_1206_Rn'}, +{txt:'Barley1 Leaf gcRMA SCRI (Dec06)',val:'B30_K_1206_R'}, +{txt:'Barley1 Embryo MAS 5.0 SCRI (Dec06)',val:'B139_K_1206_M'}, +{txt:'UCHSC BXD Whole Brain M430 2.0 (Nov06) RMA',val:'BR_M2_1106_R'}, +{txt:'HZI Treg M430v2 (Feb11) RMA',val:'RTC_1106_R'}, +{txt:'UIOWA Eye mRNA RAE230v2 (Sep06) RMA',val:'UIOWA_Eye_RMA_0906'}, +{txt:'Mouse kidney M430v2 Sex Balanced (Aug06) RMA',val:'MA_M2_0806_R'}, +{txt:'Mouse Kidney M430v2 Sex Balanced (Aug06) PDNN',val:'MA_M2_0806_P'}, +{txt:'Mouse Kidney M430v2 (Jul06) PDNN',val:'MA_M2_0706_P'}, +{txt:'Mouse Kidney M430v2 (Jul06) RMA',val:'MA_M2_0706_R'}, +{txt:'Barley1 Embryo0 gcRMA SCRI (Apr06)',val:'B150_K_0406_R'}, +{txt:'INIA Brain mRNA M430 (Jun06) RMA',val:'IBR_M_0606_R'}, +{txt:'Hippocampus Consortium M430v2 (Jun06) PDNN',val:'HC_M2_0606_P'}, +{txt:'Hippocampus Consortium M430v2 (Jun06) MAS5',val:'HC_M2_0606_M'}, +{txt:'Hippocampus Consortium M430v2 (Jun06) RMA',val:'HC_M2_0606_R'}, +{txt:'INIA Brain mRNA M430 (Jan06) RMA',val:'IBR_M_0106_R'}, +{txt:'INIA Brain mRNA M430 (Jan06) PDNN',val:'IBR_M_0106_P'}, +{txt:'Hippocampus Consortium M430v2 CXB (Dec05) RMA',val:'HC_M2CB_1205_R'}, +{txt:'Hippocampus Consortium M430v2 CXB (Dec05) PDNN',val:'HC_M2CB_1205_P'}, +{txt:'UTHSC Brain mRNA U74Av2 (Nov05) PDNN',val:'BR_U_1105_P'}, +{txt:'UMUTAffy Hippocampus Exon (Feb09) RMA',val:'UMUTAffyExon_0209_RMA'}, +{txt:'UTHSC Hippocampus Illumina v6.1 NON (Sep09) RankInv',val:'UT_ILM_BXD_hipp_NON_0909'}, +{txt:'UTHSC Hippocampus Illumina v6.1 NOS (Sep09) RankInv',val:'UT_ILM_BXD_hipp_NOS_0909'}, +{txt:'UTHSC Hippocampus Illumina v6.1 NOE (Sep09) RankInv',val:'UT_ILM_BXD_hipp_NOE_0909'}, +{txt:'UTHSC Hippocampus Illumina v6.1 RSS (Sep09) RankInv',val:'UT_ILM_BXD_hipp_RSS_0909'}, +{txt:'UTHSC Hippocampus Illumina v6.1 RSE (Sep09) RankInv',val:'UT_ILM_BXD_hipp_RSE_0909'}, +{txt:'OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN',val:'SA_M2_0905_P'}, +{txt:'OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA',val:'SA_M2_0905_R'}, +{txt:'OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5',val:'SA_M2_0905_M'}, +{txt:'UTHSC Brain mRNA U74Av2 (Aug05) RMA',val:'BR_U_0805_R'}, +{txt:'UTHSC Brain mRNA U74Av2 (Aug05) PDNN',val:'BR_U_0805_P'}, +{txt:'UTHSC Brain mRNA U74Av2 (Aug05) MAS5',val:'BR_U_0805_M'}, +{txt:'MDC/CAS/ICL Peritoneal Fat 230A (Aug05) MAS5',val:'FT_2A_0805_M'}, +{txt:'OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) RMA',val:'BRF2_M_0805_R'}, +{txt:'OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) PDNN',val:'BRF2_M_0805_P'}, +{txt:'OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) MAS5',val:'BRF2_M_0805_M'}, +{txt:'MDC/CAS/ICL Peritoneal Fat 230A (Jun05) RMA 2z+8',val:'FT_2A_0605_Rz'}, +{txt:'HBP Rosen Striatum M430V2 (Apr05) MAS5 Clean',val:'SA_M2_0405_MC'}, +{txt:'GE-NIAAA Cerebellum mRNA M430v2 (May05) PDNN',val:'GCB_M2_0505_P'}, +{txt:'GE-NIAAA Cerebellum mRNA M430v2 (May05) RMA',val:'GCB_M2_0505_R'}, +{txt:'GE-NIAAA Cerebellum mRNA M430v2 (May05) MAS5',val:'GCB_M2_0505_M'}, +{txt:'MDC/CAS/ICL Kidney 230A (Apr05) MAS5',val:'KI_2A_0405_M'}, +{txt:'HBP Rosen Striatum M430V2 (Apr05) RMA Clean',val:'SA_M2_0405_RC'}, +{txt:'HBP Rosen Striatum M430V2 (Apr05) PDNN Clean',val:'SA_M2_0405_PC'}, +{txt:'HBP Rosen Striatum M430V2 (Apr05) SScore',val:'SA_M2_0405_SS'}, +{txt:'HBP Rosen Striatum M430V2 (Apr05) RMA Orig',val:'SA_M2_0405_RR'}, +{txt:'MDC/CAS/ICL Kidney 230A (Apr05) RMA 2z+8',val:'KI_2A_0405_Rz'}, +{txt:'MDC/CAS/ICL Kidney 230A (Apr05) RMA',val:'KI_2A_0405_R'}, +{txt:'SJUT Cerebellum mRNA M430 (Mar05) PDNN',val:'CB_M_0305_P'}, +{txt:'SJUT Cerebellum mRNA M430 (Mar05) MAS5',val:'CB_M_0305_M'}, +{txt:'SJUT Cerebellum mRNA M430 (Mar05) RMA',val:'CB_M_0305_R'}, +{txt:'HQF Striatum Exon (Feb09) RMA',val:'Striatum_Exon_0209'}, +{txt:'BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv',val:'DevNeocortex_ILM6.2P14RInv_1110'}, +{txt:'BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov10) RankInv **',val:'DevStriatum_ILM6.2P14RInv_1110'}, +{txt:'BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov10) RankInv **',val:'DevStriatum_ILM6.2P3RInv_1110'}, +{txt:'BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov10) RankInv',val:'DevNeocortex_ILM6.2P3RInv_1110'}, +{txt:'SJUT Cerebellum mRNA M430 (Oct04) MAS5',val:'CB_M_1004_M'}, +{txt:'SJUT Cerebellum mRNA M430 (Oct04) PDNN',val:'CB_M_1004_P'}, +{txt:'SJUT Cerebellum mRNA M430 (Oct04) RMA',val:'CB_M_1004_R'}, +{txt:'(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5',val:'LVF2_M_0704_M'}, +{txt:'(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) RMA',val:'LVF2_M_0704_R'}, +{txt:'NCI Mammary mRNA M430 (July04) MAS5',val:'MA_M_0704_M'}, +{txt:'NCI Mammary mRNA M430 (July04) RMA',val:'MA_M_0704_R'}, +{txt:'OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) PDNN',val:'BRF2_M_0304_P'}, +{txt:'OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) RMA',val:'BRF2_M_0304_R'}, +{txt:'OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5',val:'BRF2_M_0304_M'}, +{txt:'GNF Stem Cells U74Av2 (Mar04) RMA',val:'HC_U_0304_R'}, +{txt:'INIA Brain mRNA M430 (Feb04) PDNN',val:'CB_M_0204_P'}, +{txt:'SJUT Cerebellum mRNA M430 (Oct03) MAS5',val:'CB_M_1003_M'}, +{txt:'Hippocampus Illumina NOS (Oct08) RankInv beta',val:'Illum_LXS_Hipp_NOS_1008'}, +{txt:'Hippocampus Illumina RSE (Oct08) RankInv beta',val:'Illum_LXS_Hipp_RSE_1008'}, +{txt:'GSE9588 Human Liver Normal (Mar11) Females',val:'HLCF_0311'}, +{txt:'Hippocampus Illumina RSS (Oct08) RankInv beta',val:'Illum_LXS_Hipp_RSS_1008'}, +{txt:'Hippocampus Illumina NOE (Oct08) RankInv beta',val:'Illum_LXS_Hipp_NOE_1008'}, +{txt:'Hippocampus Illumina NON (Oct08) RankInv beta',val:'Illum_LXS_Hipp_NON_1008'}, +{txt:'CANDLE Published Phenotypes',val:'CANDLEPublish'}, +{txt:'HLC Published Phenotypes',val:'HLCPublish'}, +{txt:'AKXD Genotypes',val:'AKXDGeno'}, +{txt:'AXBXA Published Phenotypes',val:'AXBXAPublish'}, +{txt:'AXBXA Genotypes',val:'AXBXAGeno'}, +{txt:'B6BTBRF2 Published Phenotypes',val:'B6BTBRF2Publish'}, +{txt:'B6BTBRF2 Genotypes',val:'B6BTBRF2Geno'}, +{txt:'B6D2F2 Genotypes',val:'B6D2F2Geno'}, +{txt:'BDF2-1999 Genotypes',val:'BDF2-1999Geno'}, +{txt:'BDF2-2005 Genotypes',val:'BDF2-2005Geno'}, +{txt:'BHF2 Genotypes',val:'BHF2Geno'}, +{txt:'BHHBF2 Genotypes',val:'BHHBF2Geno'}, +{txt:'BXD Published Phenotypes',val:'BXDPublish'}, +{txt:'BXD Genotypes',val:'BXDGeno'}, +{txt:'BXH Published Phenotypes',val:'BXHPublish'}, +{txt:'BXH Genotypes',val:'BXHGeno'}, +{txt:'CTB6F2 Published Phenotypes',val:'CTB6F2Publish'}, +{txt:'CTB6F2 Genotypes',val:'CTB6F2Geno'}, +{txt:'CXB Published Phenotypes',val:'CXBPublish'}, +{txt:'CXB Genotypes',val:'CXBGeno'}, +{txt:'LXS Published Phenotypes',val:'LXSPublish'}, +{txt:'LXS Genotypes',val:'LXSGeno'}, +{txt:'Mouse Phenome Database',val:'MDPPublish'}, +{txt:'MDP Genotypes',val:'MDPGeno'}, +{txt:'NZBXFVB-N2 Published Phenotypes',val:'NZBXFVB-N2Publish'}, +{txt:'HXBBXH Published Phenotypes',val:'HXBBXHPublish'}, +{txt:'HXBBXH Genotypes',val:'HXBBXHGeno'}, +{txt:'BayXSha Published Phenotypes',val:'BayXShaPublish'}, +{txt:'BayXSha Genotypes',val:'BayXShaGeno'}, +{txt:'ColXBur Published Phenotypes',val:'ColXBurPublish'}, +{txt:'ColXBur Genotypes',val:'ColXBurGeno'}, +{txt:'ColXCvi Published Phenotypes',val:'ColXCviPublish'}, +{txt:'ColXCvi Genotypes',val:'ColXCviGeno'}, +{txt:'SXM Published Phenotypes',val:'SXMPublish'}, +{txt:'SXM Genotypes',val:'SXMGeno'}, +{txt:'J12XJ58F2 Published Phenotypes',val:'J12XJ58F2Publish'}, +{txt:'LXP Published Phenotypes',val:'LXPPublish'}, +{txt:'All Phenotypes',val:'_allPublish'}]; + +var lArr = [ + null, +[1,1,4,79], +[1,1,4,80], +[1,1,4,127], +[1,1,4,128], +[1,2,4,1], +[1,2,4,2], +[1,2,4,126], +[1,14,59,288], +[1,14,34,32], +[1,15,26,119], +[1,15,26,142], +[1,21,8,60], +[1,21,8,61], +[1,21,8,63], +[1,21,8,67], +[1,21,42,62], +[1,21,42,65], +[1,21,42,66], +[1,21,42,69], +[1,21,46,64], +[1,21,46,68], +[1,21,46,70], +[1,21,46,71], +[1,22,59,289], +[1,22,24,76], +[1,22,24,77], +[1,22,24,284], +[1,25,3,33], +[1,25,6,37], +[1,25,7,36], +[1,25,9,54], +[1,25,10,56], +[1,25,11,53], +[1,25,14,38], +[1,25,17,51], +[1,25,19,46], +[1,25,21,47], +[1,25,28,55], +[1,25,29,52], +[1,25,30,49], +[1,25,36,58], +[1,25,37,59], +[1,25,38,57], +[1,25,40,50], +[1,25,41,45], +[1,25,43,34], +[1,25,44,48], +[1,25,45,39], +[1,25,46,42], +[1,25,49,40], +[1,25,52,35], +[1,25,54,41], +[1,25,55,43], +[1,25,57,44], +[2,30,3,14], +[2,30,4,108], +[2,30,17,12], +[2,30,35,7], +[2,30,42,107], +[3,3,60,290], +[3,3,27,135], +[3,3,27,274], +[3,3,27,275], +[3,4,59,291], +[3,4,60,292], +[3,4,13,144], +[3,5,59,293], +[3,5,60,294], +[3,5,24,272], +[3,5,24,273], +[3,6,60,295], +[3,6,4,246], +[3,6,4,247], +[3,6,4,248], +[3,6,4,276], +[3,6,4,277], +[3,6,4,278], +[3,8,60,296], +[3,8,24,183], +[3,9,60,297], +[3,9,49,239], +[3,9,49,240], +[3,9,49,241], +[3,10,60,298], +[3,10,1,158], +[3,10,1,159], +[3,10,1,182], +[3,10,4,156], +[3,10,4,157], +[3,10,4,185], +[3,10,24,164], +[3,10,24,165], +[3,10,24,186], +[3,10,32,174], +[3,10,32,175], +[3,10,32,184], +[3,11,60,299], +[3,11,1,172], +[3,11,1,173], +[3,11,1,178], +[3,11,4,166], +[3,11,4,171], +[3,11,4,179], +[3,11,24,167], +[3,11,24,170], +[3,11,24,180], +[3,11,32,168], +[3,11,32,169], +[3,11,32,181], +[3,12,59,300], +[3,12,60,301], +[3,12,3,72], +[3,12,3,73], +[3,12,3,74], +[3,12,3,75], +[3,12,4,216], +[3,12,4,224], +[3,12,4,228], +[3,12,4,229], +[3,12,4,232], +[3,12,4,242], +[3,12,4,243], +[3,12,4,244], +[3,12,4,280], +[3,12,5,153], +[3,12,5,154], +[3,12,5,177], +[3,12,8,251], +[3,12,8,252], +[3,12,8,253], +[3,12,8,261], +[3,12,8,262], +[3,12,8,263], +[3,12,8,269], +[3,12,8,270], +[3,12,8,271], +[3,12,8,281], +[3,12,13,145], +[3,12,13,146], +[3,12,13,147], +[3,12,13,148], +[3,12,13,149], +[3,12,13,150], +[3,12,13,151], +[3,12,16,111], +[3,12,16,112], +[3,12,16,113], +[3,12,16,114], +[3,12,16,115], +[3,12,16,116], +[3,12,16,117], +[3,12,16,118], +[3,12,16,279], +[3,12,17,225], +[3,12,17,226], +[3,12,17,227], +[3,12,17,233], +[3,12,17,234], +[3,12,17,235], +[3,12,17,236], +[3,12,17,237], +[3,12,17,238], +[3,12,18,98], +[3,12,18,99], +[3,12,18,100], +[3,12,20,120], +[3,12,20,121], +[3,12,20,219], +[3,12,20,220], +[3,12,20,221], +[3,12,20,222], +[3,12,23,139], +[3,12,24,19], +[3,12,24,83], +[3,12,24,84], +[3,12,24,85], +[3,12,24,86], +[3,12,24,87], +[3,12,24,88], +[3,12,24,89], +[3,12,24,90], +[3,12,24,91], +[3,12,24,92], +[3,12,25,187], +[3,12,25,188], +[3,12,31,18], +[3,12,32,20], +[3,12,32,21], +[3,12,32,22], +[3,12,33,25], +[3,12,33,26], +[3,12,33,95], +[3,12,33,97], +[3,12,33,189], +[3,12,33,265], +[3,12,33,268], +[3,12,35,190], +[3,12,35,191], +[3,12,35,192], +[3,12,42,201], +[3,12,42,202], +[3,12,42,203], +[3,12,42,204], +[3,12,42,205], +[3,12,42,206], +[3,12,47,3], +[3,12,47,4], +[3,12,47,5], +[3,12,47,6], +[3,12,47,27], +[3,12,47,28], +[3,12,48,96], +[3,12,48,101], +[3,12,48,133], +[3,12,48,141], +[3,12,48,143], +[3,12,49,23], +[3,12,49,24], +[3,12,49,93], +[3,12,49,94], +[3,12,49,194], +[3,12,49,250], +[3,12,49,255], +[3,12,49,256], +[3,12,49,257], +[3,12,49,258], +[3,12,49,264], +[3,12,49,266], +[3,12,49,267], +[3,12,50,78], +[3,12,51,217], +[3,12,53,140], +[3,12,56,130], +[3,12,56,131], +[3,12,56,132], +[3,13,59,302], +[3,13,60,303], +[3,13,5,152], +[3,13,5,155], +[3,13,5,176], +[3,18,59,304], +[3,18,60,305], +[3,18,1,9], +[3,18,1,15], +[3,18,1,163], +[3,18,4,10], +[3,18,4,16], +[3,18,4,162], +[3,18,24,8], +[3,18,24,17], +[3,18,24,161], +[3,18,32,11], +[3,18,32,13], +[3,18,32,160], +[3,19,59,306], +[3,19,60,307], +[3,19,17,230], +[3,19,17,231], +[3,19,48,193], +[3,23,17,106], +[3,23,24,105], +[3,23,25,104], +[3,24,49,81], +[3,29,59,308], +[3,29,60,309], +[3,29,17,195], +[3,29,17,196], +[3,29,17,197], +[3,29,17,198], +[3,29,17,199], +[3,29,17,200], +[3,29,17,207], +[3,29,17,282], +[3,29,17,283], +[3,29,17,285], +[3,29,17,286], +[3,29,17,287], +[3,29,42,208], +[3,29,42,209], +[3,29,42,210], +[3,31,59,310], +[3,31,60,311], +[3,31,17,102], +[3,31,17,103], +[3,31,24,29], +[3,31,24,30], +[3,31,24,31], +[3,32,59,312], +[3,32,27,134], +[4,26,59,313], +[4,26,60,314], +[4,26,2,138], +[4,26,15,137], +[4,26,17,129], +[4,26,20,254], +[4,26,20,259], +[4,26,20,260], +[4,26,24,136], +[4,26,39,245], +[4,26,39,249], +[4,35,13,218], +[5,20,58,82], +[5,33,58,109], +[5,33,58,110], +[6,7,59,315], +[6,7,60,316], +[6,16,59,317], +[6,16,60,318], +[6,17,59,319], +[6,17,60,320], +[7,34,22,122], +[7,34,22,123], +[7,34,22,124], +[7,34,22,125], +[7,36,59,321], +[7,36,60,322], +[7,36,12,211], +[7,36,12,215], +[7,36,12,223], +[7,36,22,212], +[7,36,22,213], +[7,36,22,214], +[8,27,59,323], +[9,28,59,324], +[10,37,59,325]]; + + diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu.coffee b/wqflask/wqflask/static/new/javascript/dataset_select_menu.coffee new file mode 100644 index 00000000..c9bd91f1 --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu.coffee @@ -0,0 +1,370 @@ +# +#* function: based on different browser use, will have different initial actions; +#* Once the index.html page is loaded, this function will be called +# +initialDatasetSelection = -> + defaultSpecies = getDefaultValue("species") + defaultSet = getDefaultValue("cross") + defaultType = getDefaultValue("tissue") + defaultDB = getDefaultValue("database") + if navigator.userAgent.indexOf("MSIE") >= 0 + sOptions = fillOptionsForIE(null, defaultSpecies) + menu0 = "" + document.getElementById("menu0").innerHTML = menu0 + gOptions = fillOptionsForIE("species", defaultSet) + menu1 = "" + document.getElementById("menu1").innerHTML = menu1 + tOptions = fillOptionsForIE("cross", defaultType) + menu2 = "" + document.getElementById("menu2").innerHTML = menu2 + dOptions = fillOptionsForIE("tissue", defaultDB) + menu3 = "" + document.getElementById("menu3").innerHTML = menu3 + else + fillOptions null + searchtip() + +# +#* input: selectObjId (designated select menu, such as species, cross, etc... ) +#* defaultValue (default Value of species, cross,tissue or database) +#* function: special for IE browser,setting options value for select menu dynamically based on linkage array(lArr), +#* output: options string +# +fillOptionsForIE = (selectObjId, defaultValue) -> + options = "" + unless selectObjId? + len = sArr.length + i = 1 + + while i < len + + # setting Species' option + if sArr[i].val is defaultValue + options = options + "" + else + options = options + "" + i++ + else if selectObjId is "species" + speciesObj = document.getElementById("species") + len = lArr.length + arr = [] + idx = 0 + i = 1 + + while i < len + + #get group(cross) info from lArr + arr[idx++] = lArr[i][1] if lArr[i][0] is (getIndexByValue("species", speciesObj.value)).toString() and not Contains(arr, lArr[i][1]) + i++ + idx = 0 + len = arr.length + removeOptions "cross" + i = 0 + + while i < len + + # setting Group's option + if gArr[arr[i]].val is defaultValue + options = options + "" + else + options = options + "" + i++ + else if selectObjId is "cross" + speciesObj = document.getElementById("species") + groupObj = document.getElementById("cross") + len = lArr.length + arr = [] + idx = 0 + i = 1 + + while i < len + + #get type(tissue) info from lArr + arr[idx++] = lArr[i][2] if lArr[i][0] is (getIndexByValue("species", speciesObj.value)).toString() and lArr[i][1] is (getIndexByValue("cross", groupObj.value)).toString() and not Contains(arr, lArr[i][2]) + i++ + idx = 0 + len = arr.length + removeOptions "tissue" + i = 0 + + while i < len + + # setting Type's option + if tArr[arr[i]].val is defaultValue + options = options + "" + else + options = options + "" + i++ + else if selectObjId is "tissue" + speciesObj = document.getElementById("species") + groupObj = document.getElementById("cross") + typeObj = document.getElementById("tissue") + len = lArr.length + arr = [] + idx = 0 + i = 1 + + while i < len + + #get dataset(database) info from lArr + arr[idx++] = lArr[i][3] if lArr[i][0] is (getIndexByValue("species", speciesObj.value)).toString() and lArr[i][1] is (getIndexByValue("cross", groupObj.value)).toString() and lArr[i][2] is (getIndexByValue("tissue", typeObj.value)).toString() and not Contains(arr, lArr[i][3]) + i++ + idx = 0 + len = arr.length + removeOptions "database" + i = 0 + + while i < len + + # setting Database's option + if dArr[arr[i]].val is defaultValue + options = options + "" + else + options = options + "" + i++ + options + +# +#* input: selectObjId (designated select menu, such as species, cross, etc... ) +#* function: setting options value for select menu dynamically based on linkage array(lArr) +#* output: null +# +fillOptions = (selectObjId) -> + unless selectObjId? + speciesObj = document.getElementById("species") + len = sArr.length + i = 1 + + while i < len + + # setting Species' option + speciesObj.options[i - 1] = new Option(sArr[i].txt, sArr[i].val) + i++ + updateChocie "species" + else if selectObjId is "species" + speciesObj = document.getElementById("species") + groupObj = document.getElementById("cross") + len = lArr.length + arr = [] + idx = 0 + i = 1 + + while i < len + + #get group(cross) info from lArr + arr[idx++] = lArr[i][1] if lArr[i][0] is (getIndexByValue("species", speciesObj.value)).toString() and not Contains(arr, lArr[i][1]) + i++ + idx = 0 + len = arr.length + removeOptions "cross" + i = 0 + + while i < len + + # setting Group's option + groupObj.options[idx++] = new Option(gArr[arr[i]].txt, gArr[arr[i]].val) + i++ + updateChocie "cross" + else if selectObjId is "cross" + speciesObj = document.getElementById("species") + groupObj = document.getElementById("cross") + typeObj = document.getElementById("tissue") + len = lArr.length + arr = [] + idx = 0 + i = 1 + + while i < len + + #get type(tissue) info from lArr + arr[idx++] = lArr[i][2] if lArr[i][0] is (getIndexByValue("species", speciesObj.value)).toString() and lArr[i][1] is (getIndexByValue("cross", groupObj.value)).toString() and not Contains(arr, lArr[i][2]) + i++ + idx = 0 + len = arr.length + removeOptions "tissue" + i = 0 + + while i < len + + # setting Type's option + typeObj.options[idx++] = new Option(tArr[arr[i]].txt, tArr[arr[i]].val) + i++ + updateChocie "tissue" + else if selectObjId is "tissue" + speciesObj = document.getElementById("species") + groupObj = document.getElementById("cross") + typeObj = document.getElementById("tissue") + databaseObj = document.getElementById("database") + len = lArr.length + arr = [] + idx = 0 + i = 1 + + while i < len + + #get dataset(database) info from lArr + arr[idx++] = lArr[i][3] if lArr[i][0] is (getIndexByValue("species", speciesObj.value)).toString() and lArr[i][1] is (getIndexByValue("cross", groupObj.value)).toString() and lArr[i][2] is (getIndexByValue("tissue", typeObj.value)).toString() and not Contains(arr, lArr[i][3]) + i++ + idx = 0 + len = arr.length + removeOptions "database" + i = 0 + + while i < len + + # setting Database's option + databaseObj.options[idx++] = new Option(dArr[arr[i]].txt, dArr[arr[i]].val) + i++ + updateChocie "database" + +# +#* input: arr (targeted array); obj (targeted value) +#* function: check whether targeted array contains targeted value or not +#* output: return true, if array contains targeted value, otherwise return false +# +Contains = (arr, obj) -> + i = arr.length + return true if arr[i] is obj while i-- + false + +# +#* input: selectObj (designated select menu, such as species, cross, etc... ) +#* function: clear designated select menu's option +#* output: null +# +removeOptions = (selectObj) -> + selectObj = document.getElementById(selectObj) unless typeof selectObj is "object" + len = selectObj.options.length + i = 0 + + while i < len + + # clear current selection + selectObj.options[0] = null + i++ + +# +#* input: selectObjId (designated select menu, such as species, cross, etc... ) +#* Value: target value +#* function: retrieve Index info of target value in designated array +#* output: index info +# +getIndexByValue = (selectObjId, val) -> + if selectObjId is "species" + i = 1 + + while i < sArr.length + return i if sArr[i].val is val + i++ + else if selectObjId is "cross" + i = 1 + + while i < gArr.length + return i if gArr[i].val is val + i++ + else if selectObjId is "tissue" + i = 1 + + while i < tArr.length + return i if tArr[i].val is val + i++ + else + return + +# +#* input: objId (designated select menu, such as species, cross, etc... ) +#* val(targeted value) +#* function: setting option's selected status for designated select menu based on target value, also update the following select menu in the main search page +#* output: return true if selected status has been set, otherwise return false. +# +setChoice = (objId, val) -> + Obj = document.getElementById(objId) + idx = -1 + i = 0 + while i < Obj.options.length + if Obj.options[i].value is val + idx = i + break + i++ + if idx >= 0 + + #setting option's selected status + Obj.options[idx].selected = true + + #update the following select menu + fillOptions objId + else + Obj.options[0].selected = true + fillOptions objId + +# setting option's selected status based on default setting or cookie setting for Species, Group, Type and Database select menu in the main search page http://www.genenetwork.org/ +updateChocie = (selectObjId) -> + if selectObjId is "species" + defaultSpecies = getDefaultValue("species") + + #setting option's selected status + setChoice "species", defaultSpecies + else if selectObjId is "cross" + defaultSet = getDefaultValue("cross") + + #setting option's selected status + setChoice "cross", defaultSet + else if selectObjId is "tissue" + defaultType = getDefaultValue("tissue") + + #setting option's selected status + setChoice "tissue", defaultType + else if selectObjId is "database" + defaultDB = getDefaultValue("database") + + #setting option's selected status + setChoice "database", defaultDB + +#get default value;if cookie exists, then use cookie value, otherwise use default value +getDefaultValue = (selectObjId) -> + + #define default value + defaultSpecies = "mouse" + defaultSet = "BXD" + defaultType = "Hippocampus" + defaultDB = "HC_M2_0606_P" + if selectObjId is "species" + + #if cookie exists, then use cookie value, otherwise use default value + cookieSpecies = getCookie("defaultSpecies") + defaultSpecies = cookieSpecies if cookieSpecies + defaultSpecies + else if selectObjId is "cross" + cookieSet = getCookie("defaultSet") + defaultSet = cookieSet if cookieSet + defaultSet + else if selectObjId is "tissue" + cookieType = getCookie("defaultType") + defaultType = cookieType if cookieType + defaultType + else if selectObjId is "database" + cookieDB = getCookie("defaultDB") + defaultDB = cookieDB if cookieDB + defaultDB + +#setting default value into cookies for the dropdown menus: Species,Group, Type, and Database +setDefault = (thisform) -> + setCookie "cookieTest", "cookieTest", 1 + cookieTest = getCookie("cookieTest") + delCookie "cookieTest" + if cookieTest + defaultSpecies = thisform.species.value + setCookie "defaultSpecies", defaultSpecies, 10 + defaultSet = thisform.cross.value + setCookie "defaultSet", defaultSet, 10 + defaultType = thisform.tissue.value + setCookie "defaultType", defaultType, 10 + defaultDB = thisform.database.value + setCookie "defaultDB", defaultDB, 10 + updateChocie "species" + updateChocie "cross" + updateChocie "tissue" + updateChocie "database" + alert "The current settings are now your default" + else + alert "You need to enable Cookies in your browser." \ No newline at end of file diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js new file mode 100644 index 00000000..d96d7b44 --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js @@ -0,0 +1,363 @@ +// Generated by CoffeeScript 1.3.3 +(function() { + var Contains, fillOptions, fillOptionsForIE, getDefaultValue, getIndexByValue, initialDatasetSelection, removeOptions, setChoice, setDefault, updateChocie; + + initialDatasetSelection = function() { + var dOptions, defaultDB, defaultSet, defaultSpecies, defaultType, gOptions, menu0, menu1, menu2, menu3, sOptions, tOptions; + defaultSpecies = getDefaultValue("species"); + defaultSet = getDefaultValue("cross"); + defaultType = getDefaultValue("tissue"); + defaultDB = getDefaultValue("database"); + if (navigator.userAgent.indexOf("MSIE") >= 0) { + sOptions = fillOptionsForIE(null, defaultSpecies); + menu0 = ""; + document.getElementById("menu0").innerHTML = menu0; + gOptions = fillOptionsForIE("species", defaultSet); + menu1 = ""; + document.getElementById("menu1").innerHTML = menu1; + tOptions = fillOptionsForIE("cross", defaultType); + menu2 = ""; + document.getElementById("menu2").innerHTML = menu2; + dOptions = fillOptionsForIE("tissue", defaultDB); + menu3 = ""; + document.getElementById("menu3").innerHTML = menu3; + } else { + fillOptions(null); + } + return searchtip(); + }; + + fillOptionsForIE = function(selectObjId, defaultValue) { + var arr, groupObj, i, idx, len, options, speciesObj, typeObj; + options = ""; + if (selectObjId == null) { + len = sArr.length; + i = 1; + while (i < len) { + if (sArr[i].val === defaultValue) { + options = options + ""; + } else { + options = options + ""; + } + i++; + } + } else if (selectObjId === "species") { + speciesObj = document.getElementById("species"); + len = lArr.length; + arr = []; + idx = 0; + i = 1; + while (i < len) { + if (lArr[i][0] === (getIndexByValue("species", speciesObj.value)).toString() && !Contains(arr, lArr[i][1])) { + arr[idx++] = lArr[i][1]; + } + i++; + } + idx = 0; + len = arr.length; + removeOptions("cross"); + i = 0; + while (i < len) { + if (gArr[arr[i]].val === defaultValue) { + options = options + ""; + } else { + options = options + ""; + } + i++; + } + } else if (selectObjId === "cross") { + speciesObj = document.getElementById("species"); + groupObj = document.getElementById("cross"); + len = lArr.length; + arr = []; + idx = 0; + i = 1; + while (i < len) { + if (lArr[i][0] === (getIndexByValue("species", speciesObj.value)).toString() && lArr[i][1] === (getIndexByValue("cross", groupObj.value)).toString() && !Contains(arr, lArr[i][2])) { + arr[idx++] = lArr[i][2]; + } + i++; + } + idx = 0; + len = arr.length; + removeOptions("tissue"); + i = 0; + while (i < len) { + if (tArr[arr[i]].val === defaultValue) { + options = options + ""; + } else { + options = options + ""; + } + i++; + } + } else if (selectObjId === "tissue") { + speciesObj = document.getElementById("species"); + groupObj = document.getElementById("cross"); + typeObj = document.getElementById("tissue"); + len = lArr.length; + arr = []; + idx = 0; + i = 1; + while (i < len) { + if (lArr[i][0] === (getIndexByValue("species", speciesObj.value)).toString() && lArr[i][1] === (getIndexByValue("cross", groupObj.value)).toString() && lArr[i][2] === (getIndexByValue("tissue", typeObj.value)).toString() && !Contains(arr, lArr[i][3])) { + arr[idx++] = lArr[i][3]; + } + i++; + } + idx = 0; + len = arr.length; + removeOptions("database"); + i = 0; + while (i < len) { + if (dArr[arr[i]].val === defaultValue) { + options = options + ""; + } else { + options = options + ""; + } + i++; + } + } + return options; + }; + + fillOptions = function(selectObjId) { + var arr, databaseObj, groupObj, i, idx, len, speciesObj, typeObj; + if (selectObjId == null) { + speciesObj = document.getElementById("species"); + len = sArr.length; + i = 1; + while (i < len) { + speciesObj.options[i - 1] = new Option(sArr[i].txt, sArr[i].val); + i++; + } + return updateChocie("species"); + } else if (selectObjId === "species") { + speciesObj = document.getElementById("species"); + groupObj = document.getElementById("cross"); + len = lArr.length; + arr = []; + idx = 0; + i = 1; + while (i < len) { + if (lArr[i][0] === (getIndexByValue("species", speciesObj.value)).toString() && !Contains(arr, lArr[i][1])) { + arr[idx++] = lArr[i][1]; + } + i++; + } + idx = 0; + len = arr.length; + removeOptions("cross"); + i = 0; + while (i < len) { + groupObj.options[idx++] = new Option(gArr[arr[i]].txt, gArr[arr[i]].val); + i++; + } + return updateChocie("cross"); + } else if (selectObjId === "cross") { + speciesObj = document.getElementById("species"); + groupObj = document.getElementById("cross"); + typeObj = document.getElementById("tissue"); + len = lArr.length; + arr = []; + idx = 0; + i = 1; + while (i < len) { + if (lArr[i][0] === (getIndexByValue("species", speciesObj.value)).toString() && lArr[i][1] === (getIndexByValue("cross", groupObj.value)).toString() && !Contains(arr, lArr[i][2])) { + arr[idx++] = lArr[i][2]; + } + i++; + } + idx = 0; + len = arr.length; + removeOptions("tissue"); + i = 0; + while (i < len) { + typeObj.options[idx++] = new Option(tArr[arr[i]].txt, tArr[arr[i]].val); + i++; + } + return updateChocie("tissue"); + } else if (selectObjId === "tissue") { + speciesObj = document.getElementById("species"); + groupObj = document.getElementById("cross"); + typeObj = document.getElementById("tissue"); + databaseObj = document.getElementById("database"); + len = lArr.length; + arr = []; + idx = 0; + i = 1; + while (i < len) { + if (lArr[i][0] === (getIndexByValue("species", speciesObj.value)).toString() && lArr[i][1] === (getIndexByValue("cross", groupObj.value)).toString() && lArr[i][2] === (getIndexByValue("tissue", typeObj.value)).toString() && !Contains(arr, lArr[i][3])) { + arr[idx++] = lArr[i][3]; + } + i++; + } + idx = 0; + len = arr.length; + removeOptions("database"); + i = 0; + while (i < len) { + databaseObj.options[idx++] = new Option(dArr[arr[i]].txt, dArr[arr[i]].val); + i++; + } + return updateChocie("database"); + } + }; + + Contains = function(arr, obj) { + var i; + i = arr.length; + if ((function() { + var _results; + _results = []; + while (i--) { + _results.push(arr[i] === obj); + } + return _results; + })()) { + return true; + } + return false; + }; + + removeOptions = function(selectObj) { + var i, len, _results; + if (typeof selectObj !== "object") { + selectObj = document.getElementById(selectObj); + } + len = selectObj.options.length; + i = 0; + _results = []; + while (i < len) { + selectObj.options[0] = null; + _results.push(i++); + } + return _results; + }; + + getIndexByValue = function(selectObjId, val) { + var i; + if (selectObjId === "species") { + i = 1; + while (i < sArr.length) { + if (sArr[i].val === val) { + return i; + } + i++; + } + } else if (selectObjId === "cross") { + i = 1; + while (i < gArr.length) { + if (gArr[i].val === val) { + return i; + } + i++; + } + } else if (selectObjId === "tissue") { + i = 1; + while (i < tArr.length) { + if (tArr[i].val === val) { + return i; + } + i++; + } + } else { + + } + }; + + setChoice = function(objId, val) { + var Obj, i, idx; + Obj = document.getElementById(objId); + idx = -1; + i = 0; + while (i < Obj.options.length) { + if (Obj.options[i].value === val) { + idx = i; + break; + } + i++; + } + if (idx >= 0) { + Obj.options[idx].selected = true; + return fillOptions(objId); + } else { + Obj.options[0].selected = true; + return fillOptions(objId); + } + }; + + updateChocie = function(selectObjId) { + var defaultDB, defaultSet, defaultSpecies, defaultType; + if (selectObjId === "species") { + defaultSpecies = getDefaultValue("species"); + return setChoice("species", defaultSpecies); + } else if (selectObjId === "cross") { + defaultSet = getDefaultValue("cross"); + return setChoice("cross", defaultSet); + } else if (selectObjId === "tissue") { + defaultType = getDefaultValue("tissue"); + return setChoice("tissue", defaultType); + } else if (selectObjId === "database") { + defaultDB = getDefaultValue("database"); + return setChoice("database", defaultDB); + } + }; + + getDefaultValue = function(selectObjId) { + var cookieDB, cookieSet, cookieSpecies, cookieType, defaultDB, defaultSet, defaultSpecies, defaultType; + defaultSpecies = "mouse"; + defaultSet = "BXD"; + defaultType = "Hippocampus"; + defaultDB = "HC_M2_0606_P"; + if (selectObjId === "species") { + cookieSpecies = getCookie("defaultSpecies"); + if (cookieSpecies) { + defaultSpecies = cookieSpecies; + } + return defaultSpecies; + } else if (selectObjId === "cross") { + cookieSet = getCookie("defaultSet"); + if (cookieSet) { + defaultSet = cookieSet; + } + return defaultSet; + } else if (selectObjId === "tissue") { + cookieType = getCookie("defaultType"); + if (cookieType) { + defaultType = cookieType; + } + return defaultType; + } else if (selectObjId === "database") { + cookieDB = getCookie("defaultDB"); + if (cookieDB) { + defaultDB = cookieDB; + } + return defaultDB; + } + }; + + setDefault = function(thisform) { + var cookieTest, defaultDB, defaultSet, defaultSpecies, defaultType; + setCookie("cookieTest", "cookieTest", 1); + cookieTest = getCookie("cookieTest"); + delCookie("cookieTest"); + if (cookieTest) { + defaultSpecies = thisform.species.value; + setCookie("defaultSpecies", defaultSpecies, 10); + defaultSet = thisform.cross.value; + setCookie("defaultSet", defaultSet, 10); + defaultType = thisform.tissue.value; + setCookie("defaultType", defaultType, 10); + defaultDB = thisform.database.value; + setCookie("defaultDB", defaultDB, 10); + updateChocie("species"); + updateChocie("cross"); + updateChocie("tissue"); + updateChocie("database"); + return alert("The current settings are now your default"); + } else { + return alert("You need to enable Cookies in your browser."); + } + }; + +}).call(this); diff --git a/wqflask/wqflask/static/new/javascript/validation.js b/wqflask/wqflask/static/new/javascript/validation.js new file mode 100644 index 00000000..06ed196d --- /dev/null +++ b/wqflask/wqflask/static/new/javascript/validation.js @@ -0,0 +1,51 @@ +// Generated by CoffeeScript 1.3.3 +(function() { + + $(function() { + var remove_samples_is_valid, validate_remove_samples; + remove_samples_is_valid = function(input) { + var new_splats, pattern, splat, splats, _i, _len; + if (_.trim(input).length === 0) { + return true; + } + splats = input.split(","); + new_splats = (function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = splats.length; _i < _len; _i++) { + input = splats[_i]; + _results.push(_.trim(input)); + } + return _results; + })(); + console.log("new_splats:", new_splats); + pattern = /^\d+\s*(?:-\s*\d+)?\s*$/; + for (_i = 0, _len = new_splats.length; _i < _len; _i++) { + splat = new_splats[_i]; + console.log("splat is:", splat); + if (!splat.match(pattern)) { + return false; + } + } + return true; + }; + validate_remove_samples = function() { + /* + Check if input for the remove samples function is valid and notify the user if not + */ + + var input; + input = $('#remove_samples_field').val(); + console.log("input is:", input); + if (remove_samples_is_valid(input)) { + console.log("input is valid"); + return $('#remove_samples_invalid').hide(); + } else { + console.log("input isn't valid"); + return $('#remove_samples_invalid').show(); + } + }; + return $('#remove_samples_field').change(validate_remove_samples); + }); + +}).call(this); diff --git a/wqflask/wqflask/templates/new_index_page.html b/wqflask/wqflask/templates/new_index_page.html index f2178f3c..1610c521 100644 --- a/wqflask/wqflask/templates/new_index_page.html +++ b/wqflask/wqflask/templates/new_index_page.html @@ -365,7 +365,7 @@

Special thanks to CYP1A2 and AHR.


GeneNetwork is supported by:

-