-
Notifications
You must be signed in to change notification settings - Fork 1
/
tree_explorer.html
299 lines (261 loc) · 16.4 KB
/
tree_explorer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!DOCTYPE html>
<html>
<head>
<title>[Aeon] Bifurcation tree</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css" type="text/css">
<!-- Favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<script src="script/dependencies/dagre.js"></script>
<script src="script/dependencies/cytoscape.min.js"></script>
<script src="script/dependencies/cytoscape-dagre.js"></script>
<script src="script/dependencies/lodash.js"></script>
<script src="script/dependencies/hotkeys.min.js"></script>
<script src="script/dependencies/cytoscape-tidytree.js"></script>
<script src="script/const.js"></script>
<script src="script/ComputeEngine.js"></script>
<script src="script/CytoscapeTreeEditor.js"></script>
<script src="script/treeExplorerMain.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HTCNPH6WMB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-HTCNPH6WMB');
</script>
</head>
<body onload="init()" id="tree-explorer">
<div id="cytoscape-editor">
</div>
<div id="quick-help" style="top: 40%;">
<h3 style="display: block; margin: 0 auto; float: right;">HELP</h3>
<b>Tree editor navigation:</b>
<ul>
<li>(↑) Select parent node.</li>
<li>(↓) Select positive child.</li>
<li>(Shift + ↓) Select negative child.</li>
<li>(←/→) Switch positive/negative branch.</li>
<li>(F) Fit the screen to view the entire tree.</li>
</ul>
<b>Tree actions:</b>
<ul>
<li>(⌫) Remove selected node.</li>
<li>(S) Run stability analysis for the selected node.</li>
<li>(D) Compute decision attributes for the selected node.</li>
<li>(I) Move node's subtree up.</li>
<li>(K) Move node's subtree down.</li>
<li>(J/L) Switch node's position with sibling's.</li>
<li>(R) Switch order of node's children.</li>
<li>(H) Toggle this help message.</li>
</ul>
<b>Units:</b>
<ul>
<li>Witness count: Number of fully instantiated networks.</li>
<li>(%): Percentage of networks in the node, i.e. count/total*100.</li>
<li>(٪): Log-percentage of networks, i.e. log(count)/log(total)*100.</li>
</ul>
<div style="width: 100%; text-align: center; font-size: 12px;">(this message disappears when you select some element)</div>
</div>
<h1 id='logo'>Aeon/<span id='title'>BIODIVINE</span></h1>
<div id="decision-info" class="main-panel fira-mono gone">
<div class="center" style="margin: 16px;">
<span style="position: relative; top: -20px; font-size: 14px;">Decision</span><br>
<span id="decision-attribute" style="font-size: 30px;">Lorem_Ipsum</span>
</div>
<span id="decision-phenotype-label" style="font-weight: bold; margin-top: 16px; display: inline-block; margin-bottom: 8px;">Phenotypes (X):</span>
<table id="decision-behavior-table" class="behavior-table">
<tr id="behavior-table-row-template" class="gone">
<td class="cell-behavior symbols">S O</td>
<td class="cell-witness-count">1234</td>
<td class="cell-distribution">24% / 14٪</td>
</tr>
<tr class="behavior-table-header">
<td class="cell-behavior">Behavior</td>
<td class="cell-witness-count">Witness Count</td>
<td class="cell-distribution">Distribution</td>
</tr>
<tr class="empty-space"><td></td></tr>
</table>
<div style="text-align: right; margin-bottom: 16px; margin-right: 8px; margin-top: 16px;">
<button id="decision-stability-analysis-button" class="image-button" style="float: right; margin-bottom: 16px; margin-right: 16px;">Stability analysis (S) <img src="img/stability_analysis-24px.svg"></button>
<select id="decision-stability-dropdown" class="stability-dropdown" style="float: right;">
<option value="total">Total</option>
<option value="S">Stability</option>
<option value="O">Oscillation</option>
<option value="D">Disorder</option>
</select>
</div>
<div id="decision-stability-analysis" class="stability-panel"></div>
</div>
<div id="mixed-info" class="main-panel fira-mono gone">
<div class="center" style="margin: 16px;">
<span style="position: relative; top: -20px; font-size: 14px;">Mixed</span><br>
<span id="mixed-type-label" style="font-size: 30px;">X types</span>
</div>
<table id="mixed-behavior-table" class="behavior-table">
<tr class="behavior-table-header">
<td class="cell-behavior">Behavior</td>
<td class="cell-witness-count">Witness Count</td>
<td class="cell-distribution">Distribution</td>
</tr>
<tr class="empty-space"><td></td></tr>
</table>
<div id="mixed-attributes-list-item-template" class="attribute-panel gone">
<div style="float: left;" class="information-gain">0.43 ɪɢ / 4 ᴛᴄ</div>
<div style="float: right;" class="attribute-name">ATTr_Name</div>
<div style="clear: both;"></div>
<div class="attribute-sub-panel negative">
<span class="title">Negative</span>
<table class="table collapsed">
<tr>
<td class="distribution">99%</td>
<td class="symbols phenotype">SSSSSSSSSSSSSSSSSD</td>
</tr>
</table>
</div>
<div class="attribute-sub-panel positive">
<span class="title">Positive</span>
<table class="table collapsed">
<tr>
<td class="symbols phenotype">SSSSSSSSSSSSSSSSSD</td>
<td class="distribution">99%</td>
</tr>
</table>
</div>
<div style="clear: both;"></div>
<div class="expand-button">more...</div>
</div>
<div>
<button id="mixed-stability-analysis-button" class="image-button" style="float: right; margin-bottom: 16px; margin-right: 16px;">Stability analysis (S) <img src="img/stability_analysis-24px.svg"></button>
<select id="mixed-stability-dropdown" class="stability-dropdown" style="float: right;">
<option value="total">Total</option>
<option value="S">Stability</option>
<option value="O">Oscillation</option>
<option value="D">Disorder</option>
</select>
</div>
<div id="auto-expand" style="clear: both; text-align: right; padding-right: 16px;">
<button id="button-auto-expand" class="image-button" style="margin-bottom: 16px; margin-right: 16px;">Auto expand (1 level) <img src="img/graph-24px.svg"></button>
Depth: <input type="range" min="1" max="10" value="1" class="seekbar" id="auto-expand-slider" style="width: 100px; position: relative; top: 8px;">
</div>
<div style="clear: both;">
<button id="button-add-variable" class="image-button" style="float: right; margin-bottom: 16px; margin-right: 16px;">Make decision (D) <img src="img/add_box-24px.svg"></button>
</div>
<div id="mixed-stability-analysis" class="stability-panel"></div>
<div id="mixed-attributes" class="gone">
<span id="mixed-attributes-title" style="font-weight: bold; margin-top: 16px; display: inline-block; margin-bottom: 8px;">Attributes:</span>
<div>
<b>Sort by:</b>
<label class="sort-checkbox"><input type="checkbox" name="sort-information-gain" id="sort-information-gain" checked>Information gain</label> |
<label class="sort-checkbox"><input type="checkbox" name="sort-total-classes" id="sort-total-classes">Total classes</label> |
<label class="sort-checkbox"><input type="checkbox" name="sort-positive" id="sort-positive">Positive</label> |
<label class="sort-checkbox"><input type="checkbox" name="sort-positive-majority" id="sort-positive-majority">Positive majority</label> |
<label class="sort-checkbox"><input type="checkbox" name="sort-negative" id="sort-negative">Negative</label> |
<label class="sort-checkbox"><input type="checkbox" name="sort-negative-majority" id="sort-negative-majority">Negative majority</label> |
<label class="sort-checkbox"><input type="checkbox" name="sort-alphabetical" id="sort-alphabetical">Alphabetical</label>
</div>
<div id="mixed-attributes-list">
</div>
<span style="font-size: 14px; display: block; width: 100%; text-align: right;">٪ = log-percentage</span>
<span style="font-size: 14px; display: block; width: 100%; text-align: right;">ɪɢ = information gain</span>
<span style="font-size: 14px; display: block; width: 100%; text-align: right;">ᴛᴄ = total class count</span>
</div>
</div>
<div id="leaf-info" class="main-panel fira-mono gone">
<div class="center" style="margin: 16px;">
<span style="position: relative; top: -20px; font-size: 14px;">Phenotype</span><br>
<span class="symbols" id="leaf-phenotype" style="font-size: 50px;">DDS</span>
</div>
<div>
<span style="float: left;">Witness count: <span id="leaf-witness-count">12345</span></span>
<span class="inline-button" onclick="openTreeWitness();" style="float: right;">Witness</span>
<div style="clear: both;"></div>
<span class="inline-button" onclick="openTreeAttractor();" style="float: right;">Attractor</span>
</div>
<table id="leaf-behavior-table" class="behavior-table gone" style="margin-top: 16px;">
<tr><td colspan="3">All phenotypes:</td></tr>
<tr class="behavior-table-header">
<td class="cell-behavior">Behavior</td>
<td class="cell-witness-count">Witness Count</td>
<td class="cell-distribution">Distribution</td>
</tr>
<tr class="empty-space"><td></td></tr>
</table>
<span style="font-weight: bold; margin-top: 16px; display: inline-block; margin-bottom: 8px;">Necessary conditions:</span>
<div id="leaf-necessary-conditions">Lorem Ipsum</div>
<div style="text-align: right; margin-bottom: 16px; margin-right: 8px; margin-top: 16px;">
<button id="leaf-stability-analysis-button" class="image-button" style="float: right; margin-bottom: 16px; margin-right: 16px;">Stability analysis (S) <img src="img/stability_analysis-24px.svg"></button>
<select id="leaf-stability-dropdown" class="stability-dropdown" style="float: right;">
<option value="total">Total</option>
<option value="S">Stability</option>
<option value="O">Oscillation</option>
<option value="D">Disorder</option>
</select>
</div>
<div id="leaf-stability-analysis" class="stability-panel"></div>
</div>
<div id="transparency-switch" class="grey gone">
<span id="mass-distribution-label" style="display: table-cell; height: 22px; vertical-align: middle; padding-right: 8px;">Show mass distribution</span>
<label class="switch" style="display: table-cell;">
<input id="mass-distribution" type="checkbox">
<span class="slider round"></span>
</label>
</div>
<div id="layout-settings" style="opacity: 0.5;">
<div style="margin-bottom: 15px;">
<button id="button-fit" class="image-button" style="padding-right: 12px; margin-right: 12px;">Fit</button>
<button id="button-resetlayout" class="image-button" style="padding-right: 12px">Reset layout</button>
</div>
<!--<div style="margin: 5px">
<span>Use new layout</span>
<label class="switch">
<input id="toggle-newlayout" type="checkbox" checked>
<span class="slider round"></span>
</label>
</div>-->
<div style="margin-top: 5px">
<span>Animate layout changes</span>
<label class="switch">
<input id="toggle-animate" type="checkbox">
<span class="slider round"></span>
</label>
</div>
<div style="margin-top: 5px">
<span>Snap nodes to layers</span>
<label class="switch">
<input id="toggle-layered" type="checkbox">
<span class="slider round"></span>
</label>
</div>
<div style="margin-top: 5px">
<span>Positive on the left</span>
<label class="switch">
<input id="toggle-posonleft" type="checkbox">
<span class="slider round"></span>
</label>
</div>
</div>
<div id="precision" style="opacity: 0.5;">
<input type="range" min="5001" max="10000" value="10000" class="seekbar" id="precision-slider">
Precision: <span id="precision-value">100%</span>
</div>
<div id="loading-indicator" class="invisible"><img src="img/progress.gif"/><br><br>Waiting for server...</div>
</body>
</html>