annotate js/parallelCoordinates.js @ 1:b5453d07f740 draft default tip

"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
author azomics
date Wed, 29 Jul 2020 17:03:53 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
1 // Copyright (c) 2016 Northrop Grumman.
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
2 // All rights reserved.
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
3 /*
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
4 * Initialize variables for parallelCoordinates display
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
5 */
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
6 var pCoordApp = pCoordApp || {};
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
7 pCoordApp.allPopulations = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
8 pCoordApp.selectedPopulations = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
9 pCoordApp.origData;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
10 pCoordApp.flowData;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
11 pCoordApp.headers = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
12 pCoordApp.foreground;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
13 pCoordApp.background;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
14 pCoordApp.populations = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
15 pCoordApp.allLines;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
16 pCoordApp.lines = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
17 pCoordApp.selectedLines = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
18
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
19 var displayAll = function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
20 displayParallelPlot();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
21 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
22 /*
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
23 * Display the Population Legend
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
24 */
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
25 var displayPopTable = function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
26 $('#popTable tbody').empty();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
27 pCoordApp.origData.map(function(d,index) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
28 $('#popTable tbody')
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
29 .append('<tr><td align="center"><input type="checkbox" '
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
30 + 'id="pop' + d.Population + '" '
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
31 + 'checked class="popSelect" value=' + index + '/></td>'
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
32 + '<td title="' + newNames[d.Population] + '">'
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
33 + newNames[d.Population]
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
34 + '</td><td><span style="background-color:'
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
35 + color_palette[0][index + 1][0]
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
36 + '">&nbsp;&nbsp;&nbsp;</span></td>'
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
37 + '<td>' + d.Percentage + '</td></tr>');
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
38 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
39
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
40 $('#popSelectAll').click(function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
41 var checkAll = $("#popSelectAll").prop('checked');
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
42 if (checkAll) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
43 $(".popSelect").prop("checked", true);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
44 for (var i = 0; i < pCoordApp.allLines; i ++){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
45 pCoordApp.selectedLines.push(i);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
46 pCoordApp.lines.push(i);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
47 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
48 } else {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
49 $(".popSelect").prop("checked", false);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
50 pCoordApp.selectedLines = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
51 pCoordApp.lines = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
52 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
53
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
54 pCoordApp.selectedPopulations = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
55 $('.popSelect').each(function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
56 if (this.checked) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
57 pCoordApp.selectedPopulations.push(parseInt(this.value));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
58 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
59 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
60 displayTableGrid();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
61 if (checkAll) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
62 displayParallelPlot();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
63 } else {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
64 updateParallelForeground();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
65 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
66 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
67
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
68 $('.popSelect').click(function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
69 if ($('.popSelect').length == $(".popSelect:checked").length) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
70 $('#popSelectAll').prop("checked",true);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
71 } else {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
72 $('#popSelectAll').prop("checked",false);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
73 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
74
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
75 pCoordApp.selectedPopulations = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
76 $('.popSelect').each(function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
77 if (this.checked) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
78 pCoordApp.selectedPopulations.push(parseInt(this.value));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
79 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
80 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
81
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
82 pCoordApp.selectedLines = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
83 pCoordApp.lines = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
84
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
85 pCoordApp.origData.forEach(function(d,idx){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
86 if ($.inArray(pCoordApp.populations.indexOf(d.Population), pCoordApp.selectedPopulations) > -1) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
87 pCoordApp.selectedLines.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
88 pCoordApp.lines.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
89 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
90 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
91
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
92 displayTableGrid();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
93 updateParallelForeground();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
94 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
95 updatePopTable();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
96 };
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
97
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
98 var updatePopTable = function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
99 $('.popSelect').each(function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
100 var pop = parseInt(this.value),
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
101 selectedPops = pCoordApp.origData.map(function(d){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
102 if ($.inArray(d.idx, pCoordApp.selectedLines) > -1){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
103 return pCoordApp.populations.indexOf(d.Population);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
104 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
105 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
106 if ($.inArray(pop,selectedPops) > -1) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
107 this.checked = true;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
108 } else {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
109 this.checked = false;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
110 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
111 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
112 };
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
113
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
114 /*
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
115 * Display the table under the graph
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
116 */
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
117 var displayTableGrid = function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
118 var updatedData = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
119 displayData = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
120 colNames = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
121 pctargets = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
122 colTable = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
123 tableHTML = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
124 textCol = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
125 colOrder = [],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
126 targetCol = 0;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
127
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
128 $("#tableDiv").empty();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
129 updatedData = $.extend(true, [], tableContent);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
130 updatedData.forEach(function(d, idx){d.idx = idx});
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
131 displayData = updatedData.filter(function(d, index) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
132 if ($.inArray(index,pCoordApp.selectedLines) > -1) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
133 return d;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
134 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
135 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
136
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
137 targetCol = pCoordApp.headers.length - 2;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
138 pCoordApp.headers.forEach(function(d,i){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
139 colTable.push("<th>" + d + "</th>");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
140 colNames.push({"data":d});
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
141 if (i < targetCol){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
142 pctargets.push(i);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
143 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
144 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
145 textCol = [targetCol, targetCol + 1];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
146 colOrder = textCol.concat(pctargets);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
147 tableHTML = [
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
148 '<table id="pcTable" class="pctable display compact" cellspacing="0" width="100%">',
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
149 '<thead>',
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
150 '<tr>',
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
151 colTable.join("\n"),
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
152 '</tr>',
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
153 '</thead>',
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
154 '</table>',
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
155 ];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
156
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
157 $('#tableDiv').html(tableHTML.join("\n"));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
158 var pcTable = $('#pcTable').DataTable({
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
159 columns: colNames,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
160 data: displayData,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
161 order: [[ targetCol, "asc" ]],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
162 pageLength: 10,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
163 //paging: false,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
164 scrollY: 250,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
165 scrollCollapse: true,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
166 scrollX: true,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
167 dom: '<"top"B>t<"bottom"lip><"clear">',
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
168 columnDefs: [{
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
169 targets: pctargets,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
170 className: "dt-body-right",
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
171 }, {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
172 targets: [targetCol, targetCol+1],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
173 className: "dt-body-center"
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
174 }],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
175 buttons: [
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
176 'copy', 'pdfHtml5','csvHtml5', 'colvis'
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
177 ],
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
178 colReorder: {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
179 order:colOrder
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
180 },
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
181 select: true
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
182 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
183
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
184 $('#pcTable').on('mouseover', 'tr', function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
185 var data = pcTable.row(this).data();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
186 if (data != undefined) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
187 var line = data.idx;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
188 pCoordApp.selectedLines = [ line ];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
189 updateParallelForeground();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
190 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
191 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
192 $('#pcTable').on('mouseleave', 'tr', function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
193 pCoordApp.selectedLines = [];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
194 for (var i = 0, j = pCoordApp.lines.length; i < j; i++) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
195 pCoordApp.selectedLines.push(pCoordApp.lines[i]);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
196 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
197 updateParallelForeground();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
198 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
199 };
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
200
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
201 /*
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
202 * Display The Main Plot
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
203 */
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
204 var displayParallelPlot = function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
205 var margin = {top: 30, right: 10, bottom: 10, left: 10},
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
206 h = $("#chartDiv").height()/1.5,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
207 w = $("#plotDiv").width(),
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
208 width = w - margin.left - margin.right,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
209 height = h - margin.top - margin.bottom,
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
210 dragging = {},
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
211 y = {};
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
212
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
213 $("#plotDiv").empty();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
214 $("#plotDiv").height(h);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
215 var svg = d3.select("#plotDiv").append("svg")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
216 .attr("width", width + margin.left + margin.right)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
217 .attr("height", height + margin.top + margin.bottom)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
218 .append("g")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
219 .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
220
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
221 // Y axis label
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
222 svg.append("text")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
223 .attr("class", "ylabel")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
224 .attr("transform", "rotate(-90)")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
225 .attr("y", 0 - margin.left)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
226 .attr("x", 0 - (height / 2))
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
227 .attr("dy", "1em")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
228 .style("text-anchor", "middle")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
229 .text("MFI");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
230
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
231 var x = d3.scale.ordinal().rangePoints([0, width], 1);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
232
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
233 // Use this to scale line width to percentage population
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
234 var pd = d3.extent(pCoordApp.origData, function(p) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
235 return +p['Percentage'];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
236 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
237 var popScale = d3.scale.linear().range([1,5]).domain(pd);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
238
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
239 var line = d3.svg.line();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
240 var axis = d3.svg.axis().orient("left").ticks(8);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
241
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
242 var dimensions = d3.keys(pCoordApp.flowData[0]).filter(function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
243 return (y[d] = d3.scale.linear()
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
244 .domain(d3.extent(pCoordApp.flowData,function(p) { return +p[d]; }))
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
245 .range([height, 0]));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
246 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
247 x.domain(dimensions);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
248
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
249 function path(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
250 return line(dimensions.map(function(p) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
251 return [x(p), y[p](d[p])];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
252 }));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
253 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
254 function position(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
255 var v = dragging[d];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
256 return v == null ? x(d) : v;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
257 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
258 function transition(g) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
259 return g.transition().duration(500);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
260 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
261 function brush() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
262 var actives = dimensions.filter(function(p) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
263 return !y[p].brush.empty();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
264 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
265 var extents = actives.map(function(p) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
266 return y[p].brush.extent();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
267 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
268 var indices = pCoordApp.origData.filter(function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
269 var line = d.idx;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
270 var tf = actives.every(function(p,i) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
271 return extents[i][0] <= pCoordApp.flowData[line][p] &&
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
272 pCoordApp.flowData[line][p] <= extents[i][1];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
273 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
274 if (tf) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
275 return line.toString();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
276 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
277 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
278 pCoordApp.selectedLines = indices.map(function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
279 return d.idx;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
280 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
281 pCoordApp.lines = indices.map(function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
282 return d.idx;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
283 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
284
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
285 updateParallelForeground();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
286 updatePopTable();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
287 displayTableGrid();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
288 };
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
289
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
290 // Display paths in light gray color, to use as reference
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
291 pCoordApp.background = svg.append("g")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
292 .attr("class", "background")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
293 .selectAll("path")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
294 .data(pCoordApp.flowData)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
295 .enter().append("path")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
296 .attr("d", path);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
297
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
298 // Add foreground lines for focus, color by population.
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
299 pCoordApp.foreground = svg.append("g")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
300 .attr("class", "foreground")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
301 .selectAll("path")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
302 .data(pCoordApp.origData)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
303 .enter().append("path")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
304 .attr("d", path)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
305 .attr("stroke",function(d){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
306 var pop = pCoordApp.populations.indexOf(d.Population) + 1;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
307 return color_palette[0][pop][0];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
308 })
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
309 //.attr("stroke-width", 2);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
310 // Use this if you want to scale the lines based on
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
311 // population percentage
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
312 .attr("stroke-width", function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
313 var pop = pCoordApp.populations.indexOf(d.Population);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
314 var w = popScale(pCoordApp.origData[pop]['Percentage']);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
315 w = parseInt(w);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
316 return w;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
317 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
318
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
319 // Add a group element for each dimension.
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
320 var g = svg.selectAll(".dimension")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
321 .data(dimensions)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
322 .enter().append("g")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
323 .attr("class", "dimension")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
324 .attr("transform", function(d) { return "translate(" + x(d) + ")"; })
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
325 .call(d3.behavior.drag()
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
326 .origin(function(d) { return {x: x(d)}; })
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
327 .on("dragstart", function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
328 dragging[d] = x(d);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
329 pCoordApp.background.attr("visibility", "hidden");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
330 })
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
331 .on("drag", function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
332 dragging[d] = Math.min(width, Math.max(0, d3.event.x));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
333 pCoordApp.foreground.attr("d", path);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
334 dimensions.sort(function(a, b) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
335 return position(a) - position(b);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
336 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
337 x.domain(dimensions);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
338 g.attr("transform", function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
339 return "translate(" + position(d) + ")";
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
340 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
341 })
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
342 .on("dragend", function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
343 delete dragging[d];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
344 transition(d3.select(this))
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
345 .attr("transform", "translate(" + x(d) + ")");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
346 transition(pCoordApp.foreground)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
347 .attr("d", path);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
348 pCoordApp.background.attr("d", path)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
349 .transition()
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
350 .delay(500)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
351 .duration(0)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
352 .attr("visibility", null);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
353 }));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
354
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
355 // Add an axis and title.
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
356 g.append("g")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
357 .attr("class", "axis")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
358 .each(function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
359 d3.select(this).call(axis.scale(y[d]));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
360 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
361 g.append("g")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
362 .attr("class", "xlabel")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
363 .append("text")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
364 .style("text-anchor", "middle")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
365 .attr("y", -9)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
366 .text(function(d) { return d; });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
367
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
368 // Add and store a brush for each axis.
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
369 g.append("g")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
370 .attr("class", "brush")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
371 .each(function(d) { d3.select(this).call(y[d].brush = d3.svg.brush().y(y[d]).on("brush", brush)); })
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
372 .selectAll("rect")
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
373 .attr("x", -8)
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
374 .attr("width", 16);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
375
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
376 // Control line opacity.
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
377 $('#pcline_opacity').on('change', (function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
378 var val = $(this).val();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
379 $('#plotDiv .foreground path').css('stroke-opacity', val.toString());
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
380 $('#pcopacity').html((Math.round(val*10000)/100) + "%");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
381 }));
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
382 };
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
383
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
384 var updateParallelForeground = function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
385 pCoordApp.foreground[0].map(function(d) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
386 var ln = parseInt(d['__data__']['idx']);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
387 if ($.inArray(ln, pCoordApp.selectedLines) < 0){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
388 d.style.display = "none";
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
389 } else {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
390 d.style.display = null;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
391 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
392 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
393 };
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
394
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
395 /*
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
396 * Retrieve the data, then call display functions
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
397 */
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
398 var displayParallelCoordinates = function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
399 pCoordApp.origData = $.extend(true,[], tableContent);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
400 pCoordApp.headers = Object.keys(pCoordApp.origData[0]);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
401 pCoordApp.origData.forEach(function(d,idx) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
402 d.idx = idx;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
403 pCoordApp.selectedLines.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
404 pCoordApp.lines.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
405 if (!pCoordApp.populations.includes(d.Population)){
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
406 pCoordApp.populations.push(d.Population);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
407 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
408 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
409 /*
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
410 * For the plot use only the MFI information
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
411 * for each populations. Store in flowData
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
412 */
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
413 pCoordApp.flowData = $.extend(true,[],tableContent);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
414 pCoordApp.flowData.forEach(function(d, idx) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
415 delete d['Population'];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
416 delete d['Count'];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
417 delete d['Percentage'];
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
418 delete d.Comment;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
419 pCoordApp.allPopulations.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
420 pCoordApp.selectedPopulations.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
421 pCoordApp.selectedLines.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
422 pCoordApp.lines.push(idx);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
423 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
424
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
425 pCoordApp.allLines = pCoordApp.flowData.length;
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
426 displayPopTable();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
427 displayTableGrid();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
428 displayParallelPlot();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
429
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
430 $("#resetPCoordDisplay").on("click",function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
431 for (var i = 0; i < pCoordApp.allLines; i++) {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
432 pCoordApp.allPopulations.push(i);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
433 pCoordApp.selectedPopulations.push(i);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
434 pCoordApp.selectedLines.push(i);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
435 pCoordApp.lines.push(i);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
436 }
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
437 $("#popSelectAll").prop('checked',true);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
438 $(".popSelect").prop("checked",true);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
439
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
440 var opcty = ".8";
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
441 $('#plotDiv .foreground path').css('stroke-opacity', opcty);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
442 $('#pcopacity').html("80%");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
443 $('#pcline_opacity').val(0.8);
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
444
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
445 displayPopTable();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
446 displayTableGrid();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
447 displayParallelPlot();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
448 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
449
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
450 $(window).on('resize',function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
451 waitForFinalEvent(function() {
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
452 displayAll();
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
453 }, 500, "resizeParallelCoordinates");
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
454 });
b5453d07f740 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
azomics
parents:
diff changeset
455 }