Mercurial > repos > immport-devteam > cs_overview
comparison js/pCoordMFIstats.js @ 2:a64ece32a01a draft default tip
"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/cs_overview commit a46097db0b6056e1125237393eb6974cfd51eb41"
| author | azomics |
|---|---|
| date | Tue, 28 Jul 2020 08:32:36 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:bca68066a957 | 2:a64ece32a01a |
|---|---|
| 1 // Copyright (c) 2016 Northrop Grumman. | |
| 2 // All rights reserved. | |
| 3 /* | |
| 4 * Initialize variables for parallelCoordinates display | |
| 5 */ | |
| 6 var pcAppMFI = pcAppMFI || {}; | |
| 7 | |
| 8 pcAppMFI.origData; | |
| 9 pcAppMFI.flowData; | |
| 10 pcAppMFI.background; | |
| 11 pcAppMFI.foreground; | |
| 12 pcAppMFI.selectedLines = []; | |
| 13 pcAppMFI.selectedPopulations = []; | |
| 14 pcAppMFI.selectedSamples = []; | |
| 15 pcAppMFI.populations = []; | |
| 16 pcAppMFI.samples = []; | |
| 17 pcAppMFI.lines = []; | |
| 18 pcAppMFI.allLines; | |
| 19 pcAppMFI.headers = []; | |
| 20 | |
| 21 var displayAllm = function() { | |
| 22 displayParallelPlotm(); | |
| 23 }; | |
| 24 /* | |
| 25 * Display the Population Legend | |
| 26 */ | |
| 27 var displayPopTablem = function() { | |
| 28 $('#popTablePCm tbody').empty(); | |
| 29 pcAppMFI.populations.map(function(d, index) { | |
| 30 $('#popTablePCm tbody').append('<tr><td align="center">' | |
| 31 + '<input type="checkbox" ' | |
| 32 + 'id="'+ d + '" ' | |
| 33 + 'checked class="popSelectPCm" value=' | |
| 34 + index + '/></td><td title="' + newPopNames[d] | |
| 35 + '">' + newPopNames[d] | |
| 36 + '</td><td><span style="background-color:' | |
| 37 + color_palette[0][index + 1][0] | |
| 38 + '"> </span></td></tr>'); | |
| 39 }); | |
| 40 | |
| 41 $('#popSelectAllPCm').click(function() { | |
| 42 var checkAll = $("#popSelectAllPCm").prop('checked'); | |
| 43 if (checkAll) { | |
| 44 $(".popSelectPCm").prop("checked", true); | |
| 45 for (var i = 0; i < pcAppMFI.allLines; i ++) { | |
| 46 pcAppMFI.selectedLines.push(i); | |
| 47 pcAppMFI.lines.push(i); | |
| 48 } | |
| 49 } else { | |
| 50 $(".popSelectPCm").prop("checked", false); | |
| 51 pcAppMFI.selectedLines = []; | |
| 52 pcAppMFI.lines = []; | |
| 53 } | |
| 54 | |
| 55 pcAppMFI.selectedPopulations = []; | |
| 56 $('.popSelectPCm').each(function() { | |
| 57 if (this.checked) { | |
| 58 pcAppMFI.selectedPopulations.push(parseInt(this.value)); | |
| 59 } | |
| 60 }); | |
| 61 | |
| 62 displayTableGridm(); | |
| 63 if (checkAll) { | |
| 64 displayParallelPlotm(); | |
| 65 } else { | |
| 66 updateParallelForegroundidx(); | |
| 67 } | |
| 68 }); | |
| 69 | |
| 70 $('.popSelectPCm').click(function() { | |
| 71 if ($('.popSelectPCm').length == $(".popSelectPCm:checked").length) { | |
| 72 $('#popSelectAllPCm').prop("checked",true); | |
| 73 } else { | |
| 74 $('#popSelectAllPCm').prop("checked",false); | |
| 75 } | |
| 76 pcAppMFI.selectedPopulations = []; | |
| 77 $('.popSelectPCm').each(function() { | |
| 78 if (this.checked) { | |
| 79 pcAppMFI.selectedPopulations.push(parseInt(this.value)); | |
| 80 } | |
| 81 }); | |
| 82 pcAppMFI.selectedLines = []; | |
| 83 pcAppMFI.lines = []; | |
| 84 pcAppMFI.origData.forEach(function(d,idx){ | |
| 85 if ($.inArray(pcAppMFI.populations.indexOf(d.Population), pcAppMFI.selectedPopulations) > -1) { | |
| 86 if ($.inArray(pcAppMFI.samples.indexOf(d.SmpName), pcAppMFI.selectedSamples) > -1){ | |
| 87 pcAppMFI.selectedLines.push(idx); | |
| 88 pcAppMFI.lines.push(idx); | |
| 89 } | |
| 90 } | |
| 91 }); | |
| 92 displayTableGridm(); | |
| 93 updateParallelForegroundidx(); | |
| 94 }); | |
| 95 updatePopTableidx(); | |
| 96 updateSmpTableidx(); | |
| 97 }; | |
| 98 | |
| 99 var updatePopTableidx = function() { | |
| 100 $('.popSelectPCm').each(function() { | |
| 101 var pop = parseInt(this.value); | |
| 102 var selectedPops = pcAppMFI.origData.map(function(d){ | |
| 103 if ($.inArray(d.idx, pcAppMFI.selectedLines) > -1){ | |
| 104 return pcAppMFI.populations.indexOf(d.Population); | |
| 105 } | |
| 106 }); | |
| 107 if ($.inArray(pop,selectedPops) > -1) { | |
| 108 this.checked = true; | |
| 109 } else { | |
| 110 this.checked = false; | |
| 111 } | |
| 112 }); | |
| 113 }; | |
| 114 /* | |
| 115 * Display Sample Legend | |
| 116 */ | |
| 117 var displaySmpTablem = function(){ | |
| 118 $('#smpTablePCm tbody').empty(); | |
| 119 pcAppMFI.samples.map(function(d, index) { | |
| 120 $('#smpTablePCm tbody').append('<tr><td title="' | |
| 121 + newSmpNames[d] + '">' + newSmpNames[d] | |
| 122 + '</td><td align="center">' + '<input type="checkbox" ' | |
| 123 + 'id="' + d + '" ' + 'checked class="smpSelectPCm" value=' | |
| 124 + index + '></td></tr>'); | |
| 125 }); | |
| 126 | |
| 127 $('#smpSelectAllPCm').click(function() { | |
| 128 var checkAll = $("#smpSelectAllPCm").prop('checked'); | |
| 129 if (checkAll) { | |
| 130 $(".smpSelectPCm").prop("checked", true); | |
| 131 for (var i = 0; i < pcAppMFI.allLines; i ++) { | |
| 132 pcAppMFI.selectedLines.push(i); | |
| 133 pcAppMFI.lines.push(i); | |
| 134 } | |
| 135 } else { | |
| 136 $(".smpSelectPCm").prop("checked", false); | |
| 137 pcAppMFI.selectedLines = []; | |
| 138 pcAppMFI.lines = []; | |
| 139 } | |
| 140 pcAppMFI.selectedSamples = []; | |
| 141 $('.smpSelectPCm').each(function() { | |
| 142 if (this.checked) { | |
| 143 pcAppMFI.selectedSamples.push(parseInt(this.value)); | |
| 144 } | |
| 145 }); | |
| 146 displayTableGridm(); | |
| 147 if (checkAll) { | |
| 148 displayParallelPlotm(); | |
| 149 } else { | |
| 150 updateParallelForegroundidx(); | |
| 151 } | |
| 152 }); | |
| 153 | |
| 154 $('.smpSelectPCm').click(function() { | |
| 155 if ($('.smpSelectPCm').length == $(".smpSelectPCm:checked").length) { | |
| 156 $('#smpSelectAllPCm').prop("checked",true); | |
| 157 } else { | |
| 158 $('#smpSelectAllPCm').prop("checked",false); | |
| 159 } | |
| 160 pcAppMFI.selectedSamples = []; | |
| 161 $('.smpSelectPCm').each(function() { | |
| 162 if (this.checked) { | |
| 163 pcAppMFI.selectedSamples.push(parseInt(this.value)); | |
| 164 } | |
| 165 }); | |
| 166 pcAppMFI.selectedLines = []; | |
| 167 pcAppMFI.lines = []; | |
| 168 pcAppMFI.origData.forEach(function(d,idx) { | |
| 169 if ($.inArray(pcAppMFI.populations.indexOf(d.Population), pcAppMFI.selectedPopulations) > -1) { | |
| 170 if ($.inArray(pcAppMFI.samples.indexOf(d.SmpName), pcAppMFI.selectedSamples) > -1){ | |
| 171 pcAppMFI.selectedLines.push(idx); | |
| 172 pcAppMFI.lines.push(idx); | |
| 173 } | |
| 174 } | |
| 175 }); | |
| 176 displayTableGridm(); | |
| 177 updateParallelForegroundidx(); | |
| 178 }); | |
| 179 }; | |
| 180 | |
| 181 var updateSmpTableidx = function() { | |
| 182 $('.smpSelectPCm').each(function() { | |
| 183 var smp = parseInt(this.value), | |
| 184 selectedSamples = pcAppMFI.origData.map(function(d){ | |
| 185 if ($.inArray(d.idx, pcAppMFI.selectedLines) > -1){ | |
| 186 return pcAppMFI.samples.indexOf(d.SmpName); | |
| 187 } | |
| 188 }); | |
| 189 if ($.inArray(smp,selectedSamples) > -1) { | |
| 190 this.checked = true; | |
| 191 } else { | |
| 192 this.checked = false; | |
| 193 } | |
| 194 }); | |
| 195 }; | |
| 196 /* | |
| 197 * Display Data table | |
| 198 */ | |
| 199 var displayTableGridm = function() { | |
| 200 var colTablem = [], | |
| 201 colNamesm = [], | |
| 202 pctargetsm = [], | |
| 203 displayDatamfi = [], | |
| 204 targetColm = pcAppMFI.headers.length - 3, | |
| 205 textColm = [], | |
| 206 colOrderm = [], | |
| 207 tableHTMLm = []; | |
| 208 | |
| 209 $("#tableDivPCm").empty(); | |
| 210 | |
| 211 displayDatamfi = pcAppMFI.origData.filter(function(d,i) { | |
| 212 if ($.inArray(i,pcAppMFI.selectedLines) > -1) { | |
| 213 return d; | |
| 214 } | |
| 215 }); | |
| 216 displayDatamfi.forEach(function(d){ | |
| 217 d.EditedPopName = newPopNames[d.Population]; | |
| 218 d.SampleName = newSmpNames[d.SmpName]; | |
| 219 }); | |
| 220 pcAppMFI.headers.forEach(function(d,i){ | |
| 221 colTablem.push("<th>" + d + "</th>"); | |
| 222 colNamesm.push({"data":d}); | |
| 223 if (i < targetColm - 1){ | |
| 224 pctargetsm.push(i); | |
| 225 } | |
| 226 }); | |
| 227 textColm = [targetColm, targetColm + 1, targetColm + 2]; | |
| 228 colOrderm = textColm.concat(pctargetsm); | |
| 229 colOrderm.push(targetColm - 1); | |
| 230 tableHTMLm = [ | |
| 231 '<table id="pcTableMFI" class="pctable display compact nowrap" cellspacing="0" width="100%">', | |
| 232 '<thead>', | |
| 233 '<tr>', | |
| 234 colTablem.join("\n"), | |
| 235 '</tr>', | |
| 236 '</thead>', | |
| 237 '</table>', | |
| 238 ]; | |
| 239 $('#tableDivPCm').html(tableHTMLm.join("\n")); | |
| 240 var pcTablem = $('#pcTableMFI').DataTable({ | |
| 241 columns: colNamesm, | |
| 242 data: displayDatamfi, | |
| 243 order: [[ targetColm, "asc" ]], | |
| 244 pageLength: 10, | |
| 245 //paging: false, | |
| 246 scrollY: 250, | |
| 247 scrollCollapse: true, | |
| 248 scrollX: true, | |
| 249 dom: '<"top"B>t<"bottom"lip><"clear">', | |
| 250 columnDefs: [{ | |
| 251 targets: pctargetsm, | |
| 252 className: "dt-body-right", | |
| 253 render: function(data,type,row){ | |
| 254 return parseFloat(data).toFixed(2); | |
| 255 } | |
| 256 }, { | |
| 257 targets: [targetColm - 1], | |
| 258 className: "dt-body-right", | |
| 259 render: function(data,type,row){ | |
| 260 return parseFloat(data).toFixed(2) + '%'; | |
| 261 } | |
| 262 }, { | |
| 263 targets: [targetColm, targetColm+1, targetColm+2], | |
| 264 className: "dt-body-center" | |
| 265 }], | |
| 266 buttons: [ | |
| 267 'copy', 'pdfHtml5','csvHtml5', 'colvis' | |
| 268 ], | |
| 269 colReorder: {order:colOrderm}, | |
| 270 select: true | |
| 271 }); | |
| 272 | |
| 273 $('#pcTableMFI').on('mouseover', 'tr', function() { | |
| 274 var data = pcTablem.row(this).data(); | |
| 275 if (data != undefined) { | |
| 276 var line = parseInt(data.idx); | |
| 277 pcAppMFI.selectedLines = [line]; | |
| 278 updateParallelForegroundidx(); | |
| 279 } | |
| 280 }); | |
| 281 $('#pcTableMFI').on('mouseleave', 'tr', function() { | |
| 282 pcAppMFI.selectedLines = []; | |
| 283 for (var i = 0, j = pcAppMFI.lines.length; i < j; i++){ | |
| 284 pcAppMFI.selectedLines.push(pcAppMFI.lines[i]); | |
| 285 } | |
| 286 updateParallelForegroundidx(); | |
| 287 }); | |
| 288 }; | |
| 289 /* | |
| 290 * Update Parallel Foreground | |
| 291 */ | |
| 292 var updateParallelForegroundidx = function() { | |
| 293 pcAppMFI.foreground[0].map(function(d) { | |
| 294 var ln = parseInt(d['__data__']['idx']); | |
| 295 | |
| 296 if ($.inArray(ln,pcAppMFI.selectedLines) < 0){ | |
| 297 d.style.display = "none"; | |
| 298 } else { | |
| 299 d.style.display = null; | |
| 300 } | |
| 301 }); | |
| 302 }; | |
| 303 /* | |
| 304 * Display The Main Plot | |
| 305 */ | |
| 306 var displayParallelPlotm = function() { | |
| 307 var margin = {top: 30, right: 10, bottom: 10, left: 10}, | |
| 308 h = $("#chartDivPCm").height() * 0.6, | |
| 309 w = $("#plotDivPCm").width(), | |
| 310 y = {}, | |
| 311 dragging = {}, | |
| 312 width = w - margin.left - margin.right, | |
| 313 height = h - margin.top - margin.bottom; | |
| 314 | |
| 315 $("#plotDivPCm").empty(); | |
| 316 $("#plotDivPCm").height(h); | |
| 317 | |
| 318 var svg = d3.select("#plotDivPCm").append("svg") | |
| 319 .attr("width", w) | |
| 320 .attr("height", h) | |
| 321 .append("g") | |
| 322 .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); | |
| 323 | |
| 324 // Y axis label | |
| 325 svg.append("text") | |
| 326 .attr("class", "ylabel") | |
| 327 .attr("transform", "rotate(-90)") | |
| 328 .attr("y", 0 - margin.left) | |
| 329 .attr("x", 0 - (height / 2)) | |
| 330 .attr("dy", "1em") | |
| 331 .style("text-anchor", "middle") | |
| 332 .text("MFI"); | |
| 333 | |
| 334 var x = d3.scale.ordinal().rangePoints([0, width], 1); | |
| 335 var line = d3.svg.line(); | |
| 336 var axis = d3.svg.axis().orient("left").ticks(8); | |
| 337 | |
| 338 // Use this to scale line width to percentage population | |
| 339 var pd = d3.extent(pcAppMFI.origData, function(p) { return +p['Percentage']; }); | |
| 340 var popScale = d3.scale.linear().range([1,5]).domain(pd); | |
| 341 | |
| 342 var dimensions = d3.keys(pcAppMFI.flowData[0]).filter(function(d) { | |
| 343 return (y[d] = d3.scale.linear() | |
| 344 .domain(d3.extent(pcAppMFI.flowData,function(p) { return +p[d]; })) | |
| 345 .range([height, 0])); | |
| 346 }); | |
| 347 x.domain(dimensions); | |
| 348 | |
| 349 function path(d) { | |
| 350 return line(dimensions.map(function(p) { return [x(p), y[p](d[p])]; })); | |
| 351 } | |
| 352 function position(d) { | |
| 353 var v = dragging[d]; | |
| 354 return v == null ? x(d) : v; | |
| 355 } | |
| 356 function transition(g) { | |
| 357 return g.transition().duration(500); | |
| 358 } | |
| 359 | |
| 360 function brush() { | |
| 361 var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }); | |
| 362 var extents = actives.map(function(p) { return y[p].brush.extent(); }); | |
| 363 var indices = pcAppMFI.origData.filter(function(d) { | |
| 364 var line = parseInt(d.idx) | |
| 365 var tf = actives.every(function(p,i) { | |
| 366 return extents[i][0] <= pcAppMFI.flowData[line][p] && | |
| 367 pcAppMFI.flowData[line][p] <= extents[i][1]; | |
| 368 }); | |
| 369 if (tf) { | |
| 370 return line.toString(); | |
| 371 } | |
| 372 }); | |
| 373 | |
| 374 pcAppMFI.selectedLines = indices.map(function(d) { | |
| 375 return parseInt(d.idx); | |
| 376 }); | |
| 377 pcAppMFI.lines = indices.map(function(d) { | |
| 378 return parseInt(d.idx); | |
| 379 }); | |
| 380 updateParallelForegroundidx(); | |
| 381 updatePopTableidx(); | |
| 382 updateSmpTableidx(); | |
| 383 displayTableGridm(); | |
| 384 } | |
| 385 | |
| 386 // Display paths in light gray color, to use as reference | |
| 387 pcAppMFI.background = svg.append("g") | |
| 388 .attr("class", "background") | |
| 389 .selectAll("path") | |
| 390 .data(pcAppMFI.flowData) | |
| 391 .enter().append("path") | |
| 392 .attr("d", path); | |
| 393 | |
| 394 // Add foreground lines for focus, color by population. | |
| 395 pcAppMFI.foreground = svg.append("g") | |
| 396 .attr("class", "foreground") | |
| 397 .selectAll("path") | |
| 398 .data(pcAppMFI.origData) | |
| 399 .enter().append("path") | |
| 400 .attr("d", path) | |
| 401 .attr("stroke",function(d){ | |
| 402 var pop = pcAppMFI.populations.indexOf(d.Population) + 1; | |
| 403 return color_palette[0][pop][0]; }) | |
| 404 //.attr("stroke-width", 1); | |
| 405 // Use this if you want to scale the lines based on | |
| 406 // population percentage | |
| 407 .attr("stroke-width", function(d) { | |
| 408 var pop = pcAppMFI.populations.indexOf(d.Population); | |
| 409 var w = popScale(pcAppMFI.origData[pop]['Percentage']); | |
| 410 w = parseInt(w); | |
| 411 return w; | |
| 412 }); | |
| 413 | |
| 414 // Add a group element for each dimension. | |
| 415 var g = svg.selectAll(".dimension") | |
| 416 .data(dimensions) | |
| 417 .enter().append("g") | |
| 418 .attr("class", "dimension") | |
| 419 .attr("transform", function(d) { return "translate(" + x(d) + ")"; }) | |
| 420 .call(d3.behavior.drag() | |
| 421 .origin(function(d) { return {x: x(d)}; }) | |
| 422 .on("dragstart", function(d) { | |
| 423 dragging[d] = x(d); | |
| 424 pcAppMFI.background.attr("visibility", "hidden"); }) | |
| 425 .on("drag", function(d) { | |
| 426 dragging[d] = Math.min(width, Math.max(0, d3.event.x)); | |
| 427 pcAppMFI.foreground.attr("d", path); | |
| 428 dimensions.sort(function(a, b) { return position(a) - position(b); }); | |
| 429 x.domain(dimensions); | |
| 430 g.attr("transform", function(d) { return "translate(" + position(d) + ")"; }); }) | |
| 431 .on("dragend", function(d) { | |
| 432 delete dragging[d]; | |
| 433 transition(d3.select(this)).attr("transform", "translate(" + x(d) + ")"); | |
| 434 transition(pcAppMFI.foreground).attr("d", path); | |
| 435 pcAppMFI.background | |
| 436 .attr("d", path) | |
| 437 .transition() | |
| 438 .delay(500) | |
| 439 .duration(0) | |
| 440 .attr("visibility", null); | |
| 441 })); | |
| 442 | |
| 443 // Add an axis and title. | |
| 444 g.append("g") | |
| 445 .attr("class", "axis") | |
| 446 .each(function(d) { d3.select(this).call(axis.scale(y[d])); }); | |
| 447 g.append("g") | |
| 448 .attr("class", "xlabel") | |
| 449 .append("text") | |
| 450 .style("text-anchor", "middle") | |
| 451 .attr("y", -9) | |
| 452 .text(function(d) { return d; }); | |
| 453 | |
| 454 // Add and store a brush for each axis. | |
| 455 g.append("g") | |
| 456 .attr("class", "brush") | |
| 457 .each(function(d) { d3.select(this).call(y[d].brush = d3.svg.brush().y(y[d]).on("brush", brush)); }) | |
| 458 .selectAll("rect") | |
| 459 .attr("x", -8) | |
| 460 .attr("width", 16); | |
| 461 | |
| 462 // Control line opacity. | |
| 463 $('#PCmline_opacity').on('change', (function() { | |
| 464 var val = $(this).val(); | |
| 465 $('#plotDivPCm .foreground path').css('stroke-opacity', val.toString()); | |
| 466 $('#pcm_opacity').html((Math.round(val*10000)/100) + "%"); | |
| 467 })); | |
| 468 }; | |
| 469 | |
| 470 /* | |
| 471 * Retrieve the data, then call display functions | |
| 472 */ | |
| 473 var displayParallelCoordinatesMFI = function() { | |
| 474 var inputFile = "./csAllMFIs.tsv"; | |
| 475 d3.tsv(inputFile, function(error, data) { | |
| 476 var allPops = 0, | |
| 477 allSamples = 0; | |
| 478 if (error) { | |
| 479 alert("Problem Retrieving Data"); | |
| 480 return; | |
| 481 } | |
| 482 pcAppMFI.origData = $.extend(true,[],data); | |
| 483 pcAppMFI.headers = Object.keys(pcAppMFI.origData[0]); | |
| 484 pcAppMFI.headers.push("EditedPopName"); | |
| 485 pcAppMFI.origData.forEach(function(d,idx) { | |
| 486 d.idx = idx; | |
| 487 d.EditedPopName = d.Population; | |
| 488 d.SmpName = d.SampleName; | |
| 489 pcAppMFI.selectedLines.push(idx); | |
| 490 pcAppMFI.lines.push(idx); | |
| 491 if (!pcAppMFI.populations.includes(d.Population)){ | |
| 492 pcAppMFI.populations.push(d.Population); | |
| 493 } | |
| 494 if (!pcAppMFI.samples.includes(d.SmpName)){ | |
| 495 pcAppMFI.samples.push(d.SmpName); | |
| 496 } | |
| 497 }); | |
| 498 pcAppMFI.populations = pcAppMFI.populations.sort(function(a, b){return a-b}); | |
| 499 pcAppMFI.allLines = pcAppMFI.origData.length; | |
| 500 | |
| 501 allPops = pcAppMFI.populations.length; | |
| 502 allSamples = pcAppMFI.samples.length; | |
| 503 for (var i = 0; i < allPops; i++) { | |
| 504 pcAppMFI.selectedPopulations.push(i); | |
| 505 } | |
| 506 for (var i = 0; i < allSamples; i++) { | |
| 507 pcAppMFI.selectedSamples.push(i); | |
| 508 } | |
| 509 /* | |
| 510 * For the plot use only the MFI information | |
| 511 * for each populations. Store in flowData | |
| 512 */ | |
| 513 pcAppMFI.flowData = $.extend(true,[],data); | |
| 514 pcAppMFI.flowData.forEach(function(d) { | |
| 515 delete d['Population']; | |
| 516 delete d['SampleName']; | |
| 517 delete d['Percentage']; | |
| 518 }); | |
| 519 | |
| 520 displayPopTablem(); | |
| 521 displaySmpTablem(); | |
| 522 displayTableGridm(); | |
| 523 displayParallelPlotm(); | |
| 524 | |
| 525 $("#resetDisplayMFIpop").on("click",function() { | |
| 526 var opcty = ".8"; | |
| 527 for (var i = 0; i < allPops; i++) { | |
| 528 pcAppMFI.selectedPopulations.push(i); | |
| 529 } | |
| 530 for (var i = 0; i < allSamples; i++) { | |
| 531 pcAppMFI.selectedSamples.push(i); | |
| 532 } | |
| 533 for (var i = 0; i < pcAppMFI.allLines; i++) { | |
| 534 pcAppMFI.selectedLines.push(i); | |
| 535 pcAppMFI.lines.push(i); | |
| 536 } | |
| 537 | |
| 538 $("#popSelectAllPCm").prop('checked',true); | |
| 539 $(".popSelectPCm").prop("checked",true); | |
| 540 $("#smpSelectAllPCm").prop('checked',true); | |
| 541 $(".smpSelectPCm").prop("checked",true); | |
| 542 | |
| 543 $('#plotDivPCm .foreground path').css('stroke-opacity', opcty); | |
| 544 $('#pcm_opacity').html("80%"); | |
| 545 $('#PCmline_opacity').val(0.8); | |
| 546 | |
| 547 displayPopTablem(); | |
| 548 displaySmpTablem(); | |
| 549 displayTableGridm(); | |
| 550 displayParallelPlotm(); | |
| 551 }); | |
| 552 | |
| 553 $(window).on('resize',function() { | |
| 554 waitForFinalEvent(function() { | |
| 555 displayAllm(); | |
| 556 }, 500, "resizePCm"); | |
| 557 }); | |
| 558 }); | |
| 559 }; |
