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