@microbiome-informatics/genome-properties-viewer 0.0.0-stage → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +63 -2
- package/bin/d3.custom.min.js +9424 -0
- package/gp-style.css +528 -0
- package/index.js +30 -0
- package/package.json +74 -4
- package/src/d3.js +28 -0
- package/src/gp-controller.js +282 -0
- package/src/gp-filters.js +74 -0
- package/src/gp-hierarchy.js +143 -0
- package/src/gp-scroller.js +197 -0
- package/src/gp-steps.js +218 -0
- package/src/gp-tax-node.js +266 -0
- package/src/gp-taxonomy-sorter.js +86 -0
- package/src/gp-taxonomy.js +387 -0
- package/src/gp-totals.js +209 -0
- package/src/gp-ui-utils.js +261 -0
- package/src/gp-uploader.js +402 -0
- package/src/gp-viewer.js +734 -0
- package/src/modal.js +56 -0
- package/src/zoomer.js +128 -0
package/gp-style.css
ADDED
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
line {
|
|
2
|
+
stroke: #fff;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
text {
|
|
6
|
+
font: 12px sans-serif;
|
|
7
|
+
text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff;
|
|
8
|
+
fill: #20202f;
|
|
9
|
+
}
|
|
10
|
+
text.col_title,
|
|
11
|
+
text.row_title {
|
|
12
|
+
opacity: 0.7;
|
|
13
|
+
-webkit-user-select: none;
|
|
14
|
+
-moz-user-select: none;
|
|
15
|
+
-ms-user-select: none;
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
text.col_title:hover,
|
|
19
|
+
text.row_title:hover,
|
|
20
|
+
text.active,
|
|
21
|
+
.node text.active {
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
opacity: 1 !important;
|
|
24
|
+
}
|
|
25
|
+
.cell:hover {
|
|
26
|
+
stroke: #ffffff;
|
|
27
|
+
stroke-width: 3px;
|
|
28
|
+
}
|
|
29
|
+
.node circle {
|
|
30
|
+
fill: rgb(183, 83, 84);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.node text {
|
|
34
|
+
-webkit-user-select: none;
|
|
35
|
+
-moz-user-select: none;
|
|
36
|
+
-ms-user-select: none;
|
|
37
|
+
user-select: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.node--internal circle {
|
|
41
|
+
fill: rgb(173, 73, 74);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
g.node.loaded {
|
|
45
|
+
cursor: ew-resize;
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
g.node.loaded:hover .node-type {
|
|
49
|
+
fill: white;
|
|
50
|
+
cursor: no-drop;
|
|
51
|
+
}
|
|
52
|
+
.node--internal text {
|
|
53
|
+
text-shadow: 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff;
|
|
54
|
+
opacity: 0.1;
|
|
55
|
+
}
|
|
56
|
+
.node text.label-species {
|
|
57
|
+
opacity: 0.1;
|
|
58
|
+
}
|
|
59
|
+
.node text.label-species:hover {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
.node:hover text.label-species,
|
|
63
|
+
g.node.loaded text.label-species {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.link {
|
|
68
|
+
fill: none;
|
|
69
|
+
stroke: rgb(173, 73, 74);
|
|
70
|
+
stroke-opacity: 0.7;
|
|
71
|
+
stroke-width: 1.5px;
|
|
72
|
+
}
|
|
73
|
+
.legend_value {
|
|
74
|
+
text-shadow: 0 0;
|
|
75
|
+
}
|
|
76
|
+
.height-sizer {
|
|
77
|
+
stroke-width: 3px;
|
|
78
|
+
opacity: 0;
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
}
|
|
81
|
+
.height-dragger {
|
|
82
|
+
cursor: ns-resize;
|
|
83
|
+
opacity: 0.7;
|
|
84
|
+
}
|
|
85
|
+
.height-dragger:hover {
|
|
86
|
+
opacity: 1;
|
|
87
|
+
}
|
|
88
|
+
.height-dragger:hover .height-sizer {
|
|
89
|
+
stroke: lightblue;
|
|
90
|
+
opacity: 0.7;
|
|
91
|
+
}
|
|
92
|
+
input[type="file"] {
|
|
93
|
+
color: transparent;
|
|
94
|
+
width: 150px;
|
|
95
|
+
}
|
|
96
|
+
.selector a {
|
|
97
|
+
color: #3c67c1;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
margin-left: 3px;
|
|
100
|
+
}
|
|
101
|
+
.selector a:hover {
|
|
102
|
+
text-decoration: underline;
|
|
103
|
+
}
|
|
104
|
+
.selector ul {
|
|
105
|
+
list-style-type: none;
|
|
106
|
+
margin-top: 10px;
|
|
107
|
+
}
|
|
108
|
+
.selector ul li {
|
|
109
|
+
margin: 2px;
|
|
110
|
+
}
|
|
111
|
+
.selector {
|
|
112
|
+
border: 1px solid #ccc;
|
|
113
|
+
width: 200px;
|
|
114
|
+
color: #666;
|
|
115
|
+
text-align: right;
|
|
116
|
+
margin-bottom: 2px;
|
|
117
|
+
cursor: context-menu;
|
|
118
|
+
}
|
|
119
|
+
.selector::after {
|
|
120
|
+
content: " ▾ ";
|
|
121
|
+
margin: 3px;
|
|
122
|
+
}
|
|
123
|
+
.selector .current_status {
|
|
124
|
+
display: inline-block;
|
|
125
|
+
}
|
|
126
|
+
.selector div.options {
|
|
127
|
+
visibility: hidden;
|
|
128
|
+
width: 400px;
|
|
129
|
+
background-color: #fdfdfd;
|
|
130
|
+
color: #666;
|
|
131
|
+
padding: 5px;
|
|
132
|
+
position: absolute;
|
|
133
|
+
z-index: 1;
|
|
134
|
+
border: 2px #ddd solid;
|
|
135
|
+
text-align: left;
|
|
136
|
+
}
|
|
137
|
+
.selector:hover div.options {
|
|
138
|
+
visibility: visible;
|
|
139
|
+
}
|
|
140
|
+
.selector .current_status {
|
|
141
|
+
text-transform: capitalize;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.top-controllers {
|
|
145
|
+
display: flex;
|
|
146
|
+
justify-content: space-between;
|
|
147
|
+
align-items: stretch;
|
|
148
|
+
padding: 5px 20px 5px 5px;
|
|
149
|
+
flex-wrap: wrap;
|
|
150
|
+
}
|
|
151
|
+
.top-controllers > ul {
|
|
152
|
+
margin: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.gp-legends {
|
|
156
|
+
border: 1px solid rgb(200, 200, 200);
|
|
157
|
+
padding: 2px;
|
|
158
|
+
}
|
|
159
|
+
.gp-legends ul {
|
|
160
|
+
list-style: none;
|
|
161
|
+
|
|
162
|
+
display: flex;
|
|
163
|
+
|
|
164
|
+
flex-wrap: wrap;
|
|
165
|
+
-webkit-padding-start: 0;
|
|
166
|
+
justify-content: space-between;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
margin: 0;
|
|
169
|
+
}
|
|
170
|
+
.gp-legends ul li {
|
|
171
|
+
width: 100px;
|
|
172
|
+
text-align: right;
|
|
173
|
+
padding: 1px;
|
|
174
|
+
}
|
|
175
|
+
.gp-legends ul label {
|
|
176
|
+
color: gray;
|
|
177
|
+
text-transform: capitalize;
|
|
178
|
+
vertical-align: super;
|
|
179
|
+
}
|
|
180
|
+
.gp-legends ul div.color {
|
|
181
|
+
width: 40px;
|
|
182
|
+
height: 16px;
|
|
183
|
+
margin-left: 5px;
|
|
184
|
+
display: inline-flex;
|
|
185
|
+
vertical-align: text-bottom;
|
|
186
|
+
padding: 2px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.step-details-button,
|
|
190
|
+
.step-details-button path,
|
|
191
|
+
.step-details-button circle {
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
}
|
|
194
|
+
.step-details-button circle {
|
|
195
|
+
fill: rgba(30, 60, 90, 0.2);
|
|
196
|
+
}
|
|
197
|
+
.step-details-button:hover circle {
|
|
198
|
+
fill: rgba(30, 60, 90, 0.7);
|
|
199
|
+
}
|
|
200
|
+
.gp-modal {
|
|
201
|
+
position: fixed;
|
|
202
|
+
width: 100vw;
|
|
203
|
+
height: 100vh;
|
|
204
|
+
background: #96afc1;
|
|
205
|
+
opacity: 0;
|
|
206
|
+
top: 0;
|
|
207
|
+
left: 0;
|
|
208
|
+
pointer-events: none;
|
|
209
|
+
}
|
|
210
|
+
div.gp-modal.gp-modal-active {
|
|
211
|
+
pointer-events: auto;
|
|
212
|
+
opacity: 0.5;
|
|
213
|
+
}
|
|
214
|
+
div.gp-modal-content.gp-modal-active {
|
|
215
|
+
pointer-events: auto;
|
|
216
|
+
opacity: 1;
|
|
217
|
+
padding: 1em;
|
|
218
|
+
}
|
|
219
|
+
.gp-modal-popup {
|
|
220
|
+
position: fixed;
|
|
221
|
+
left: 50%;
|
|
222
|
+
top: 50%;
|
|
223
|
+
pointer-events: none;
|
|
224
|
+
}
|
|
225
|
+
.gp-modal-content {
|
|
226
|
+
position: relative;
|
|
227
|
+
width: 80vw;
|
|
228
|
+
min-height: 100px;
|
|
229
|
+
height: 100%;
|
|
230
|
+
max-height: 80vh;
|
|
231
|
+
background: white;
|
|
232
|
+
top: -10vh;
|
|
233
|
+
left: -50%;
|
|
234
|
+
opacity: 0;
|
|
235
|
+
pointer-events: none;
|
|
236
|
+
overflow: scroll;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.progress-panel {
|
|
240
|
+
display: flex;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
align-items: center;
|
|
243
|
+
}
|
|
244
|
+
.progress-panel .gauges-panel {
|
|
245
|
+
text-align: center;
|
|
246
|
+
}
|
|
247
|
+
.progress-panel .requests-list {
|
|
248
|
+
background: #5d5d5d;
|
|
249
|
+
color: #b8ff72;
|
|
250
|
+
font-family: monospace;
|
|
251
|
+
min-height: 100px;
|
|
252
|
+
margin: 5px;
|
|
253
|
+
}
|
|
254
|
+
.progress-panel .percentage {
|
|
255
|
+
text-anchor: middle;
|
|
256
|
+
font-size: 1.5em;
|
|
257
|
+
fill: cornflowerblue;
|
|
258
|
+
stroke: none;
|
|
259
|
+
}
|
|
260
|
+
.progress-panel .label {
|
|
261
|
+
text-anchor: middle;
|
|
262
|
+
font-size: 0.8em;
|
|
263
|
+
stroke-width: 0;
|
|
264
|
+
}
|
|
265
|
+
circle.gauge-bg {
|
|
266
|
+
fill: transparent;
|
|
267
|
+
stroke: #cccccc;
|
|
268
|
+
stroke-width: 1px;
|
|
269
|
+
}
|
|
270
|
+
circle.gauge-val {
|
|
271
|
+
fill: transparent;
|
|
272
|
+
stroke: cornflowerblue;
|
|
273
|
+
stroke-width: 3px;
|
|
274
|
+
}
|
|
275
|
+
@keyframes bouncing {
|
|
276
|
+
0% {
|
|
277
|
+
stroke-dashoffset: 120;
|
|
278
|
+
opacity: 0.5;
|
|
279
|
+
}
|
|
280
|
+
50% {
|
|
281
|
+
stroke-dashoffset: 130;
|
|
282
|
+
opacity: 1;
|
|
283
|
+
}
|
|
284
|
+
100% {
|
|
285
|
+
stroke-dashoffset: 120;
|
|
286
|
+
opacity: 0.5;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
.gauge-val.uncertain {
|
|
290
|
+
animation: bouncing 1s ease infinite;
|
|
291
|
+
}
|
|
292
|
+
.step-popup {
|
|
293
|
+
width: 20px;
|
|
294
|
+
height: 20px;
|
|
295
|
+
border: 1px solid #444444;
|
|
296
|
+
margin-left: calc(50% - 10px);
|
|
297
|
+
}
|
|
298
|
+
.step-popup.passed {
|
|
299
|
+
background: rgba(100, 250, 100, 0.7);
|
|
300
|
+
}
|
|
301
|
+
.step-popup.failed {
|
|
302
|
+
background: rgba(200, 200, 200, 0.3);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.gp-YES {
|
|
306
|
+
background: rgb(49, 130, 189);
|
|
307
|
+
}
|
|
308
|
+
.gp-NO {
|
|
309
|
+
background: rgb(210, 210, 210);
|
|
310
|
+
}
|
|
311
|
+
.gp-PARTIAL {
|
|
312
|
+
background: rgb(107, 174, 214);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@keyframes loading {
|
|
316
|
+
0% {
|
|
317
|
+
opacity: 0.5;
|
|
318
|
+
}
|
|
319
|
+
50% {
|
|
320
|
+
opacity: 1;
|
|
321
|
+
}
|
|
322
|
+
100% {
|
|
323
|
+
opacity: 0.5;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.loading {
|
|
328
|
+
animation: loading 2s ease infinite;
|
|
329
|
+
display: inline-block;
|
|
330
|
+
font-size: 1.2em;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
div.info-tooltip {
|
|
334
|
+
position: absolute;
|
|
335
|
+
border: 1px solid rgb(173, 73, 74);
|
|
336
|
+
border-radius: 2px;
|
|
337
|
+
background: white;
|
|
338
|
+
opacity: 0.8;
|
|
339
|
+
top: 300px;
|
|
340
|
+
left: 500px;
|
|
341
|
+
visibility: hidden;
|
|
342
|
+
}
|
|
343
|
+
div.info-tooltip ul {
|
|
344
|
+
list-style: none;
|
|
345
|
+
padding-left: 10px;
|
|
346
|
+
padding-right: 10px;
|
|
347
|
+
}
|
|
348
|
+
div.info-tooltip ul > li {
|
|
349
|
+
padding-bottom: 4px;
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
}
|
|
352
|
+
div.info-tooltip ul > li .label {
|
|
353
|
+
float: left;
|
|
354
|
+
font-weight: bold;
|
|
355
|
+
text-align: right;
|
|
356
|
+
width: 40%;
|
|
357
|
+
padding-right: 4px;
|
|
358
|
+
}
|
|
359
|
+
div.info-tooltip ul > li .content {
|
|
360
|
+
overflow: hidden;
|
|
361
|
+
}
|
|
362
|
+
div.container {
|
|
363
|
+
padding: 20px;
|
|
364
|
+
display: flex;
|
|
365
|
+
flex-direction: column;
|
|
366
|
+
height: 95%;
|
|
367
|
+
background: #efefef;
|
|
368
|
+
}
|
|
369
|
+
div.container h1 {
|
|
370
|
+
font-weight: 100;
|
|
371
|
+
font-size: 3em;
|
|
372
|
+
margin: -5px 0 10px 0;
|
|
373
|
+
text-align: center;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
div.container > div {
|
|
377
|
+
background: white;
|
|
378
|
+
}
|
|
379
|
+
.top-controllers > div {
|
|
380
|
+
background: white;
|
|
381
|
+
border: 0;
|
|
382
|
+
margin-right: 2%;
|
|
383
|
+
}
|
|
384
|
+
.top-controllers > div > ul {
|
|
385
|
+
list-style-type: none;
|
|
386
|
+
padding: 0 10px 0 20px;
|
|
387
|
+
}
|
|
388
|
+
.top-controllers > div ul li label {
|
|
389
|
+
color: gray;
|
|
390
|
+
display: inline;
|
|
391
|
+
}
|
|
392
|
+
.top-controllers input[type="text"],
|
|
393
|
+
.top-controllers select {
|
|
394
|
+
width: 197px;
|
|
395
|
+
display: block;
|
|
396
|
+
}
|
|
397
|
+
.top-controllers > div header {
|
|
398
|
+
position: relative;
|
|
399
|
+
top: -0.7em;
|
|
400
|
+
margin-bottom: -0.7em;
|
|
401
|
+
font-weight: bold;
|
|
402
|
+
color: #666;
|
|
403
|
+
text-shadow: 0 0 3px white;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
div.container .top-block {
|
|
407
|
+
margin-bottom: 3px;
|
|
408
|
+
padding: 4px;
|
|
409
|
+
background: #fafafa;
|
|
410
|
+
position: relative;
|
|
411
|
+
}
|
|
412
|
+
div.container .top-block .minimise {
|
|
413
|
+
position: absolute;
|
|
414
|
+
right: 1em;
|
|
415
|
+
top: -0.2em;
|
|
416
|
+
cursor: pointer;
|
|
417
|
+
}
|
|
418
|
+
div.container .top-block .minimise::after {
|
|
419
|
+
content: "▾";
|
|
420
|
+
position: absolute;
|
|
421
|
+
}
|
|
422
|
+
div.container .top-block .minimise.on::after {
|
|
423
|
+
transform: rotate(180deg);
|
|
424
|
+
}
|
|
425
|
+
.color.filter::after {
|
|
426
|
+
content: attr(type);
|
|
427
|
+
position: relative;
|
|
428
|
+
right: 0;
|
|
429
|
+
font-size: 0.8em;
|
|
430
|
+
}
|
|
431
|
+
.color.filter {
|
|
432
|
+
box-shadow: 0 0 3px rgb(173, 73, 74);
|
|
433
|
+
}
|
|
434
|
+
.gpv-scrollbar rect.gpv-scrollbar-handle {
|
|
435
|
+
fill: rgba(100, 100, 100, 0.6);
|
|
436
|
+
}
|
|
437
|
+
.gpv-scrollbar-x rect.gpv-scrollbar-handle {
|
|
438
|
+
cursor: ew-resize;
|
|
439
|
+
}
|
|
440
|
+
.gpv-scrollbar-y rect.gpv-scrollbar-handle {
|
|
441
|
+
cursor: ns-resize;
|
|
442
|
+
}
|
|
443
|
+
.gpv-scrollbar rect.gpv-scrollbar-bg {
|
|
444
|
+
fill: rgba(100, 100, 100, 0.2);
|
|
445
|
+
stroke: rgba(100, 100, 100, 0.4);
|
|
446
|
+
}
|
|
447
|
+
.gpv-scrollbar rect.gpv-scrollbar-handle:hover {
|
|
448
|
+
fill: rgba(100, 100, 100, 0.8);
|
|
449
|
+
}
|
|
450
|
+
.gpv-zoomer circle,
|
|
451
|
+
.gpv-sorter circle {
|
|
452
|
+
fill: white;
|
|
453
|
+
stroke: #333;
|
|
454
|
+
stroke-width: 2;
|
|
455
|
+
opacity: 0.7;
|
|
456
|
+
cursor: pointer;
|
|
457
|
+
}
|
|
458
|
+
.gpv-zoomer text,
|
|
459
|
+
.gpv-sorter text {
|
|
460
|
+
text-anchor: middle;
|
|
461
|
+
alignment-baseline: central;
|
|
462
|
+
opacity: 0.7;
|
|
463
|
+
cursor: pointer;
|
|
464
|
+
pointer-events: none;
|
|
465
|
+
user-select: none;
|
|
466
|
+
}
|
|
467
|
+
.gpv-zoomer circle:hover,
|
|
468
|
+
.gpv-zoomer text:hover {
|
|
469
|
+
opacity: 1;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.gpv-sorter line.bar {
|
|
473
|
+
pointer-events: none;
|
|
474
|
+
stroke: #333;
|
|
475
|
+
stroke-width: 2;
|
|
476
|
+
cursor: pointer;
|
|
477
|
+
}
|
|
478
|
+
.total_title {
|
|
479
|
+
pointer-events: none;
|
|
480
|
+
user-select: none;
|
|
481
|
+
}
|
|
482
|
+
.autocomplete-suggestions {
|
|
483
|
+
text-align: left;
|
|
484
|
+
cursor: default;
|
|
485
|
+
border: 1px solid #ccc;
|
|
486
|
+
border-top: 0;
|
|
487
|
+
background: #fff;
|
|
488
|
+
box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.1);
|
|
489
|
+
|
|
490
|
+
/* core styles should not be changed */
|
|
491
|
+
position: absolute;
|
|
492
|
+
display: none;
|
|
493
|
+
z-index: 9999;
|
|
494
|
+
max-height: 254px;
|
|
495
|
+
overflow: hidden;
|
|
496
|
+
overflow-y: auto;
|
|
497
|
+
box-sizing: border-box;
|
|
498
|
+
}
|
|
499
|
+
.autocomplete-suggestion {
|
|
500
|
+
position: relative;
|
|
501
|
+
padding: 0 0.6em;
|
|
502
|
+
line-height: 23px;
|
|
503
|
+
white-space: nowrap;
|
|
504
|
+
overflow: hidden;
|
|
505
|
+
text-overflow: ellipsis;
|
|
506
|
+
font-size: 1.02em;
|
|
507
|
+
color: #333;
|
|
508
|
+
}
|
|
509
|
+
.autocomplete-suggestion b {
|
|
510
|
+
font-weight: normal;
|
|
511
|
+
color: #1f8dd6;
|
|
512
|
+
}
|
|
513
|
+
.autocomplete-suggestion.selected {
|
|
514
|
+
background: #f0f0f0;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/* svg.gp-viewer:focus {
|
|
518
|
+
background: aliceblue;
|
|
519
|
+
} */
|
|
520
|
+
|
|
521
|
+
.step-toggler circle,
|
|
522
|
+
.step-toggler path {
|
|
523
|
+
cursor: zoom-in;
|
|
524
|
+
}
|
|
525
|
+
.step-toggler.expanded circle,
|
|
526
|
+
.step-toggler.expanded path {
|
|
527
|
+
cursor: zoom-out;
|
|
528
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import GenomePropertiesViewer from "./src/gp-viewer";
|
|
2
|
+
import * as d3 from "./src/d3";
|
|
3
|
+
import { uploadLocalGPFile } from "./src/gp-uploader";
|
|
4
|
+
|
|
5
|
+
export default { d3, GenomePropertiesViewer, uploadLocalGPFile };
|
|
6
|
+
|
|
7
|
+
// TODO: Focus/Filter on a tax branch.
|
|
8
|
+
// DONE: scrollbars
|
|
9
|
+
// DONE: Different labels for Species(species, tax-id, none)
|
|
10
|
+
// DONE: Search species
|
|
11
|
+
// DONE: Different labels for GP(Name, id, both)
|
|
12
|
+
// DONE: Filter rows by all with {YES, NO, PARTIAL}
|
|
13
|
+
// DONE: Filter properties by text
|
|
14
|
+
// DONE: Color tree
|
|
15
|
+
// DONE: Extend the backgroud as atransparent layer for events
|
|
16
|
+
// DONE: height and width using window size
|
|
17
|
+
// DONE: change nodes-labels on the tree to provide options-info
|
|
18
|
+
// DONE: MOve bottom panel to the top
|
|
19
|
+
// DONE: Top genome properties as a dropdown
|
|
20
|
+
// DONE: tree frame resizable
|
|
21
|
+
// DONE: Making the tree an exploratory widget
|
|
22
|
+
// DONE: Genome properties categories
|
|
23
|
+
// DONE: Piechart per organism
|
|
24
|
+
// DONE: Make cell size editable - Via Zooming
|
|
25
|
+
// DONE: Order by tree
|
|
26
|
+
// DONE: Make collapsing tree optional
|
|
27
|
+
// DONE: Cells should be squares
|
|
28
|
+
// DONE: Organism name in bottom frame
|
|
29
|
+
// DONE: Drag from inner nodes
|
|
30
|
+
// DONE: Total column fix width
|
package/package.json
CHANGED
|
@@ -1,6 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microbiome-informatics/genome-properties-viewer",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
|
+
"description": "A heatmap styled viewer for the genome properties",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"index.js",
|
|
8
|
+
"src/*.js",
|
|
9
|
+
"gp-style.css",
|
|
10
|
+
"bin/d3.custom.min.js"
|
|
11
|
+
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "rollup -c",
|
|
17
|
+
"watch": "rollup -cw",
|
|
18
|
+
"test:lint": "eslint --color \"./**/*.js\"",
|
|
19
|
+
"browser-sync": "browser-sync start --server -f bin/*.*",
|
|
20
|
+
"serve": "npm run watch & npm run browser-sync",
|
|
21
|
+
"create-taxonomy-file": "node src/taxonomy/taxonomy_retriever.js > taxonomy.json",
|
|
22
|
+
"prettier": "prettier --write src/*",
|
|
23
|
+
"prepare": "node -e \"try{require('husky').install()}catch(e){if(e.code!=='MODULE_NOT_FOUND')throw e}\"",
|
|
24
|
+
"jsdoc": "jsdoc2md src/*.js > reference.md"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/EBI-Metagenomics/genome-properties-viewer.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"genome",
|
|
32
|
+
"properties",
|
|
33
|
+
"heatmap"
|
|
34
|
+
],
|
|
35
|
+
"author": "Gustavo A. Salazar",
|
|
36
|
+
"license": "Apache-2.0",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/EBI-Metagenomics/genome-properties-viewer/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/EBI-Metagenomics/genome-properties-viewer#readme",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"d3-array": "2.11.0",
|
|
43
|
+
"d3-dispatch": "2.0.0",
|
|
44
|
+
"d3-drag": "2.0.0",
|
|
45
|
+
"d3-dsv": "2.0.0",
|
|
46
|
+
"d3-hierarchy": "2.0.0",
|
|
47
|
+
"d3-interpolate": "2.0.1",
|
|
48
|
+
"d3-scale": "3.2.3",
|
|
49
|
+
"d3-scale-chromatic": "2.0.0",
|
|
50
|
+
"d3-selection": "2.0.0",
|
|
51
|
+
"d3-shape": "2.0.0",
|
|
52
|
+
"d3-timer": "2.0.0",
|
|
53
|
+
"d3-transition": "2.0.0",
|
|
54
|
+
"d3-zoom": "2.0.0",
|
|
55
|
+
"js-autocomplete-tremby": "^1.0.5",
|
|
56
|
+
"regenerator-runtime": "0.13.7"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@babel/cli": "^7.2.0",
|
|
60
|
+
"@babel/core": "^7.2.0",
|
|
61
|
+
"@babel/preset-env": "^7.2.0",
|
|
62
|
+
"browser-sync": "^2.29.3",
|
|
63
|
+
"eslint": "7.21.0",
|
|
64
|
+
"eslint-config-airbnb-base": "14.2.1",
|
|
65
|
+
"eslint-config-prettier": "8.1.0",
|
|
66
|
+
"eslint-plugin-import": "^2.22.1",
|
|
67
|
+
"husky": "^5.1.3",
|
|
68
|
+
"jsdoc-to-markdown": "7.0.0",
|
|
69
|
+
"mysql": "2.18.1",
|
|
70
|
+
"prettier": "2.2.1",
|
|
71
|
+
"regenerator": "0.14.7",
|
|
72
|
+
"rollup": "^2.80.0",
|
|
73
|
+
"rollup-plugin-babel": "^4.1.0",
|
|
74
|
+
"rollup-plugin-node-resolve": "5.2.0"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/src/d3.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { select, selectAll } from "d3-selection";
|
|
2
|
+
export { range } from "d3-array";
|
|
3
|
+
export { drag } from "d3-drag";
|
|
4
|
+
export {
|
|
5
|
+
stack,
|
|
6
|
+
pie,
|
|
7
|
+
arc,
|
|
8
|
+
symbol,
|
|
9
|
+
symbolCross,
|
|
10
|
+
symbolCircle,
|
|
11
|
+
symbolTriangle,
|
|
12
|
+
} from "d3-shape";
|
|
13
|
+
export { transition } from "d3-transition";
|
|
14
|
+
export { stratify, cluster, tree, hierarchy } from "d3-hierarchy";
|
|
15
|
+
export { scaleLinear, scaleBand, scaleOrdinal } from "d3-scale";
|
|
16
|
+
|
|
17
|
+
const colors = (s) => s.match(/.{6}/g).map((x) => `#${x}`);
|
|
18
|
+
export const schemeCategory20b = colors(
|
|
19
|
+
"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export { tsvParseRows } from "d3-dsv";
|
|
23
|
+
export { zoom } from "d3-zoom";
|
|
24
|
+
export { interpolate } from "d3-interpolate";
|
|
25
|
+
export { dispatch } from "d3-dispatch";
|
|
26
|
+
|
|
27
|
+
export const entries = (object) =>
|
|
28
|
+
Object.entries(object || {}).map(([key, value]) => ({ key, value }));
|