diff --git a/grails-app/views/trait/_traitTableHeader.gsp b/grails-app/views/trait/_traitTableHeader.gsp index b9fa09c37..b55aa5ba1 100755 --- a/grails-app/views/trait/_traitTableHeader.gsp +++ b/grails-app/views/trait/_traitTableHeader.gsp @@ -22,6 +22,7 @@ $( document ).ready(function() { mpgSoftware.manhattanplotTableHeader.fillSampleGroupDropdown('<%=phenotypeKey%>'); + mpgSoftware.manhattanplotTableHeader.fillPhenotypesDropdownNew('T2D', '<%=phenotypeKey%>'); mpgSoftware.manhattanplotTableHeader.fillPhenotypesDropdown('<%=params.trait%>' || 'T2D', 'manhattanPhenotypeDropdownWrapper','phenotypeDropdown'); mpgSoftware.manhattanplotTableHeader.fillRegionalTraitAnalysis('<%=phenotypeKey%>',''); }); @@ -41,23 +42,20 @@

Phenotype

+ - %{----}% - -

Dataset  

- + ;
-
+

r2 threshold  

- diff --git a/web-app/js/lib/dport/manhattanplotTableHeader.js b/web-app/js/lib/dport/manhattanplotTableHeader.js index 81ffd80c3..620032716 100644 --- a/web-app/js/lib/dport/manhattanplotTableHeader.js +++ b/web-app/js/lib/dport/manhattanplotTableHeader.js @@ -7,6 +7,7 @@ var mpgSoftware = mpgSoftware || {}; mpgSoftware.manhattanplotTableHeader = (function () { var mySavedVariables = {}; + var globalFirstDataset = ""; var setMySavedVariables = function(saveTheseVariables){ mySavedVariables = saveTheseVariables; } @@ -34,19 +35,18 @@ var mpgSoftware = mpgSoftware || {}; (data)) { if ((data.sampleGroups) && (data.sampleGroups.length > 0)) { - //first empty the old one - $('#manhattanSampleGroupChooser').empty() - //assume we have data and process it + var options = $('#manhattanSampleGroupChooser'); + options.empty(); + options.append(""); + for (var i = 0; i < data.sampleGroups.length; i++) { var sampleGroup = data.sampleGroups[i]; - console.log("sample group default: "+sampleGroup.default); - $('#manhattanSampleGroupChooser').append(new Option(sampleGroup.sgn, sampleGroup.sg, sampleGroup.default)); + var newOption = $("