@genspectrum/dashboard-components 1.11.0 → 1.12.0
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/dist/assets/mutationOverTimeWorker-f8Kp0S6V.js.map +1 -0
- package/dist/components.d.ts +53 -53
- package/dist/components.js +88 -36
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +53 -53
- package/package.json +1 -1
- package/src/lapisApi/lapisTypes.ts +1 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +1 -1
- package/src/preact/mutationsOverTime/mutations-over-time-grid-tooltip.stories.tsx +47 -0
- package/src/preact/mutationsOverTime/mutations-over-time-grid-tooltip.tsx +64 -28
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +2 -2
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +2 -2
- package/src/query/queryMutationsOverTime.ts +22 -15
- package/src/query/queryMutationsOverTimeNewEndpoint.spec.ts +100 -291
- package/src/web-components/visualization/gs-mutation-comparison.tsx +2 -2
- package/standalone-bundle/assets/mutationOverTimeWorker-AhhjjklP.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +1822 -1769
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/assets/mutationOverTimeWorker-dhufsWQ2.js.map +0 -1
- package/standalone-bundle/assets/mutationOverTimeWorker-CGqPKySO.js.map +0 -1
|
@@ -8,45 +8,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
8
8
|
const lapisFilter = { field1: 'value1', field2: 'value2' };
|
|
9
9
|
const dateField = 'dateField';
|
|
10
10
|
|
|
11
|
-
lapisRequestMocks.
|
|
12
|
-
|
|
11
|
+
lapisRequestMocks.aggregated(
|
|
12
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
13
13
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{ count: 2, [dateField]: '2023-01-03' },
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
body: {
|
|
24
|
-
...lapisFilter,
|
|
25
|
-
dateFieldFrom: '2023-01-01',
|
|
26
|
-
dateFieldTo: '2023-01-01',
|
|
27
|
-
fields: [],
|
|
28
|
-
},
|
|
29
|
-
response: { data: [{ count: 11 }] },
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
body: {
|
|
33
|
-
...lapisFilter,
|
|
34
|
-
dateFieldFrom: '2023-01-02',
|
|
35
|
-
dateFieldTo: '2023-01-02',
|
|
36
|
-
fields: [],
|
|
37
|
-
},
|
|
38
|
-
response: { data: [{ count: 12 }] },
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
body: {
|
|
42
|
-
...lapisFilter,
|
|
43
|
-
dateFieldFrom: '2023-01-03',
|
|
44
|
-
dateFieldTo: '2023-01-03',
|
|
45
|
-
fields: [],
|
|
46
|
-
},
|
|
47
|
-
response: { data: [{ count: 13 }] },
|
|
14
|
+
data: [
|
|
15
|
+
{ count: 1, [dateField]: '2023-01-01' },
|
|
16
|
+
{ count: 2, [dateField]: '2023-01-03' },
|
|
17
|
+
],
|
|
48
18
|
},
|
|
49
|
-
|
|
19
|
+
);
|
|
50
20
|
lapisRequestMocks.multipleMutations(
|
|
51
21
|
[
|
|
52
22
|
{
|
|
@@ -102,6 +72,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
102
72
|
],
|
|
103
73
|
dateRanges,
|
|
104
74
|
mutations: ['otherSequenceName:G234C', 'sequenceName:A123T'],
|
|
75
|
+
totalCountsByDateRange: [11, 12, 13],
|
|
105
76
|
},
|
|
106
77
|
},
|
|
107
78
|
},
|
|
@@ -120,14 +91,14 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
120
91
|
|
|
121
92
|
const expectedData = [
|
|
122
93
|
[
|
|
123
|
-
{ type: '
|
|
124
|
-
{ type: '
|
|
125
|
-
{ type: '
|
|
94
|
+
{ type: 'valueWithCoverage', count: 4, coverage: 10, totalCount: 11 },
|
|
95
|
+
{ type: 'valueWithCoverage', count: 0, coverage: 10, totalCount: 12 },
|
|
96
|
+
{ type: 'valueWithCoverage', count: 0, coverage: 10, totalCount: 13 },
|
|
126
97
|
],
|
|
127
98
|
[
|
|
128
|
-
{ type: '
|
|
129
|
-
{ type: '
|
|
130
|
-
{ type: '
|
|
99
|
+
{ type: 'valueWithCoverage', count: 1, coverage: 10, totalCount: 11 },
|
|
100
|
+
{ type: 'valueWithCoverage', count: 2, coverage: 10, totalCount: 12 },
|
|
101
|
+
{ type: 'valueWithCoverage', count: 3, coverage: 10, totalCount: 13 },
|
|
131
102
|
],
|
|
132
103
|
];
|
|
133
104
|
expect(mutationOverTimeData.getAsArray()).to.deep.equal(expectedData);
|
|
@@ -175,44 +146,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
175
146
|
const lapisFilter = { field1: 'value1', field2: 'value2' };
|
|
176
147
|
const dateField = 'dateField';
|
|
177
148
|
|
|
178
|
-
lapisRequestMocks.
|
|
149
|
+
lapisRequestMocks.aggregated(
|
|
150
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
179
151
|
{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
{ count: 2, [dateField]: '2023-01-03' },
|
|
185
|
-
],
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
body: {
|
|
190
|
-
...lapisFilter,
|
|
191
|
-
dateFieldFrom: '2023-01-01',
|
|
192
|
-
dateFieldTo: '2023-01-01',
|
|
193
|
-
fields: [],
|
|
194
|
-
},
|
|
195
|
-
response: { data: [{ count: 11 }] },
|
|
152
|
+
data: [
|
|
153
|
+
{ count: 1, [dateField]: '2023-01-01' },
|
|
154
|
+
{ count: 2, [dateField]: '2023-01-03' },
|
|
155
|
+
],
|
|
196
156
|
},
|
|
197
|
-
|
|
198
|
-
body: {
|
|
199
|
-
...lapisFilter,
|
|
200
|
-
dateFieldFrom: '2023-01-02',
|
|
201
|
-
dateFieldTo: '2023-01-02',
|
|
202
|
-
fields: [],
|
|
203
|
-
},
|
|
204
|
-
response: { data: [{ count: 0 }] },
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
body: {
|
|
208
|
-
...lapisFilter,
|
|
209
|
-
dateFieldFrom: '2023-01-03',
|
|
210
|
-
dateFieldTo: '2023-01-03',
|
|
211
|
-
fields: [],
|
|
212
|
-
},
|
|
213
|
-
response: { data: [{ count: 13 }] },
|
|
214
|
-
},
|
|
215
|
-
]);
|
|
157
|
+
);
|
|
216
158
|
|
|
217
159
|
lapisRequestMocks.multipleMutations(
|
|
218
160
|
[
|
|
@@ -271,6 +213,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
271
213
|
],
|
|
272
214
|
dateRanges,
|
|
273
215
|
mutations: ['otherSequenceName:G234C', 'sequenceName:A123T'],
|
|
216
|
+
totalCountsByDateRange: [11, 0, 13],
|
|
274
217
|
},
|
|
275
218
|
},
|
|
276
219
|
},
|
|
@@ -289,14 +232,14 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
289
232
|
|
|
290
233
|
expect(mutationOverTimeData.getAsArray()).to.deep.equal([
|
|
291
234
|
[
|
|
292
|
-
{ type: '
|
|
235
|
+
{ type: 'valueWithCoverage', count: 4, coverage: 10, totalCount: 11 },
|
|
293
236
|
null,
|
|
294
|
-
{ type: '
|
|
237
|
+
{ type: 'valueWithCoverage', count: 0, coverage: 10, totalCount: 13 },
|
|
295
238
|
],
|
|
296
239
|
[
|
|
297
|
-
{ type: '
|
|
240
|
+
{ type: 'valueWithCoverage', count: 1, coverage: 10, totalCount: 11 },
|
|
298
241
|
null,
|
|
299
|
-
{ type: '
|
|
242
|
+
{ type: 'valueWithCoverage', count: 3, coverage: 10, totalCount: 13 },
|
|
300
243
|
],
|
|
301
244
|
]);
|
|
302
245
|
|
|
@@ -314,44 +257,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
314
257
|
const lapisFilter = { field1: 'value1', field2: 'value2' };
|
|
315
258
|
const dateField = 'dateField';
|
|
316
259
|
|
|
317
|
-
lapisRequestMocks.
|
|
318
|
-
{
|
|
319
|
-
body: { ...lapisFilter, fields: [dateField] },
|
|
320
|
-
response: {
|
|
321
|
-
data: [
|
|
322
|
-
{ count: 1, [dateField]: '2023-01-01' },
|
|
323
|
-
{ count: 2, [dateField]: '2023-01-03' },
|
|
324
|
-
],
|
|
325
|
-
},
|
|
326
|
-
},
|
|
260
|
+
lapisRequestMocks.aggregated(
|
|
261
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
327
262
|
{
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
fields: [],
|
|
333
|
-
},
|
|
334
|
-
response: { data: [{ count: 11 }] },
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
body: {
|
|
338
|
-
...lapisFilter,
|
|
339
|
-
dateFieldFrom: '2023-01-02',
|
|
340
|
-
dateFieldTo: '2023-01-02',
|
|
341
|
-
fields: [],
|
|
342
|
-
},
|
|
343
|
-
response: { data: [{ count: 12 }] },
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
body: {
|
|
347
|
-
...lapisFilter,
|
|
348
|
-
dateFieldFrom: '2023-01-03',
|
|
349
|
-
dateFieldTo: '2023-01-03',
|
|
350
|
-
fields: [],
|
|
351
|
-
},
|
|
352
|
-
response: { data: [{ count: 13 }] },
|
|
263
|
+
data: [
|
|
264
|
+
{ count: 1, [dateField]: '2023-01-01' },
|
|
265
|
+
{ count: 2, [dateField]: '2023-01-03' },
|
|
266
|
+
],
|
|
353
267
|
},
|
|
354
|
-
|
|
268
|
+
);
|
|
355
269
|
|
|
356
270
|
lapisRequestMocks.multipleMutations(
|
|
357
271
|
[
|
|
@@ -399,6 +313,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
399
313
|
data: [],
|
|
400
314
|
dateRanges,
|
|
401
315
|
mutations: [],
|
|
316
|
+
totalCountsByDateRange: [],
|
|
402
317
|
},
|
|
403
318
|
},
|
|
404
319
|
},
|
|
@@ -428,35 +343,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
428
343
|
const dateField = 'dateField';
|
|
429
344
|
const lapisFilter = { field1: 'value1', field2: 'value2', [`${dateField}From`]: '2023-01-02' };
|
|
430
345
|
|
|
431
|
-
lapisRequestMocks.
|
|
432
|
-
{
|
|
433
|
-
body: { ...lapisFilter, fields: [dateField] },
|
|
434
|
-
response: {
|
|
435
|
-
data: [
|
|
436
|
-
{ count: 1, [dateField]: '2023-01-01' },
|
|
437
|
-
{ count: 2, [dateField]: '2023-01-03' },
|
|
438
|
-
],
|
|
439
|
-
},
|
|
440
|
-
},
|
|
346
|
+
lapisRequestMocks.aggregated(
|
|
347
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
441
348
|
{
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
fields: [],
|
|
447
|
-
},
|
|
448
|
-
response: { data: [{ count: 11 }] },
|
|
349
|
+
data: [
|
|
350
|
+
{ count: 1, [dateField]: '2023-01-01' },
|
|
351
|
+
{ count: 2, [dateField]: '2023-01-03' },
|
|
352
|
+
],
|
|
449
353
|
},
|
|
450
|
-
|
|
451
|
-
body: {
|
|
452
|
-
...lapisFilter,
|
|
453
|
-
dateFieldFrom: '2023-01-03',
|
|
454
|
-
dateFieldTo: '2023-01-03',
|
|
455
|
-
fields: [],
|
|
456
|
-
},
|
|
457
|
-
response: { data: [{ count: 12 }] },
|
|
458
|
-
},
|
|
459
|
-
]);
|
|
354
|
+
);
|
|
460
355
|
|
|
461
356
|
lapisRequestMocks.multipleMutations(
|
|
462
357
|
[
|
|
@@ -505,6 +400,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
505
400
|
],
|
|
506
401
|
dateRanges,
|
|
507
402
|
mutations: ['sequenceName:A123T'],
|
|
403
|
+
totalCountsByDateRange: [11, 12],
|
|
508
404
|
},
|
|
509
405
|
},
|
|
510
406
|
},
|
|
@@ -523,8 +419,8 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
523
419
|
|
|
524
420
|
expect(mutationOverTimeData.getAsArray()).to.deep.equal([
|
|
525
421
|
[
|
|
526
|
-
{ type: '
|
|
527
|
-
{ type: '
|
|
422
|
+
{ type: 'valueWithCoverage', count: 2, coverage: 10, totalCount: 11 },
|
|
423
|
+
{ type: 'valueWithCoverage', count: 3, coverage: 10, totalCount: 12 },
|
|
528
424
|
],
|
|
529
425
|
]);
|
|
530
426
|
|
|
@@ -540,35 +436,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
540
436
|
const dateField = 'dateField';
|
|
541
437
|
const lapisFilter = { field1: 'value1', field2: 'value2', [`${dateField}To`]: '2023-01-02' };
|
|
542
438
|
|
|
543
|
-
lapisRequestMocks.
|
|
439
|
+
lapisRequestMocks.aggregated(
|
|
440
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
544
441
|
{
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
{ count: 2, [dateField]: '2023-01-03' },
|
|
550
|
-
],
|
|
551
|
-
},
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
body: {
|
|
555
|
-
...lapisFilter,
|
|
556
|
-
dateFieldFrom: '2023-01-01',
|
|
557
|
-
dateFieldTo: '2023-01-01',
|
|
558
|
-
fields: [],
|
|
559
|
-
},
|
|
560
|
-
response: { data: [{ count: 11 }] },
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
body: {
|
|
564
|
-
...lapisFilter,
|
|
565
|
-
dateFieldFrom: '2023-01-02',
|
|
566
|
-
dateFieldTo: '2023-01-02',
|
|
567
|
-
fields: [],
|
|
568
|
-
},
|
|
569
|
-
response: { data: [{ count: 12 }] },
|
|
442
|
+
data: [
|
|
443
|
+
{ count: 1, [dateField]: '2023-01-01' },
|
|
444
|
+
{ count: 2, [dateField]: '2023-01-03' },
|
|
445
|
+
],
|
|
570
446
|
},
|
|
571
|
-
|
|
447
|
+
);
|
|
572
448
|
|
|
573
449
|
lapisRequestMocks.multipleMutations(
|
|
574
450
|
[
|
|
@@ -617,6 +493,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
617
493
|
],
|
|
618
494
|
dateRanges,
|
|
619
495
|
mutations: ['sequenceName:A123T'],
|
|
496
|
+
totalCountsByDateRange: [11, 12],
|
|
620
497
|
},
|
|
621
498
|
},
|
|
622
499
|
},
|
|
@@ -635,8 +512,8 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
635
512
|
|
|
636
513
|
expect(mutationOverTimeData.getAsArray()).to.deep.equal([
|
|
637
514
|
[
|
|
638
|
-
{ type: '
|
|
639
|
-
{ type: '
|
|
515
|
+
{ type: 'valueWithCoverage', count: 1, coverage: 10, totalCount: 11 },
|
|
516
|
+
{ type: 'valueWithCoverage', count: 2, coverage: 10, totalCount: 12 },
|
|
640
517
|
],
|
|
641
518
|
]);
|
|
642
519
|
|
|
@@ -652,26 +529,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
652
529
|
const dateField = 'dateField';
|
|
653
530
|
const lapisFilter = { field1: 'value1', field2: 'value2', [dateField]: '2023-01-02' };
|
|
654
531
|
|
|
655
|
-
lapisRequestMocks.
|
|
532
|
+
lapisRequestMocks.aggregated(
|
|
533
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
656
534
|
{
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
{ count: 2, [dateField]: '2023-01-03' },
|
|
662
|
-
],
|
|
663
|
-
},
|
|
535
|
+
data: [
|
|
536
|
+
{ count: 1, [dateField]: '2023-01-01' },
|
|
537
|
+
{ count: 2, [dateField]: '2023-01-03' },
|
|
538
|
+
],
|
|
664
539
|
},
|
|
665
|
-
|
|
666
|
-
body: {
|
|
667
|
-
...lapisFilter,
|
|
668
|
-
dateFieldFrom: '2023-01-02',
|
|
669
|
-
dateFieldTo: '2023-01-02',
|
|
670
|
-
fields: [],
|
|
671
|
-
},
|
|
672
|
-
response: { data: [{ count: 11 }] },
|
|
673
|
-
},
|
|
674
|
-
]);
|
|
540
|
+
);
|
|
675
541
|
|
|
676
542
|
lapisRequestMocks.multipleMutations(
|
|
677
543
|
[
|
|
@@ -709,6 +575,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
709
575
|
data: [[{ count: 2, coverage: 10 }]],
|
|
710
576
|
dateRanges,
|
|
711
577
|
mutations: ['sequenceName:A123T'],
|
|
578
|
+
totalCountsByDateRange: [11],
|
|
712
579
|
},
|
|
713
580
|
},
|
|
714
581
|
},
|
|
@@ -726,7 +593,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
726
593
|
});
|
|
727
594
|
|
|
728
595
|
expect(mutationOverTimeData.getAsArray()).to.deep.equal([
|
|
729
|
-
[{ type: '
|
|
596
|
+
[{ type: 'valueWithCoverage', count: 2, coverage: 10, totalCount: 11 }],
|
|
730
597
|
]);
|
|
731
598
|
|
|
732
599
|
const sequences = mutationOverTimeData.getFirstAxisKeys();
|
|
@@ -740,35 +607,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
740
607
|
const lapisFilter = { field1: 'value1', field2: 'value2' };
|
|
741
608
|
const dateField = 'dateField';
|
|
742
609
|
|
|
743
|
-
lapisRequestMocks.
|
|
610
|
+
lapisRequestMocks.aggregated(
|
|
611
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
744
612
|
{
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
{ count: 2, [dateField]: '2023-02-15' },
|
|
750
|
-
],
|
|
751
|
-
},
|
|
613
|
+
data: [
|
|
614
|
+
{ count: 1, [dateField]: '2023-01-05' },
|
|
615
|
+
{ count: 2, [dateField]: '2023-02-15' },
|
|
616
|
+
],
|
|
752
617
|
},
|
|
753
|
-
|
|
754
|
-
body: {
|
|
755
|
-
...lapisFilter,
|
|
756
|
-
dateFieldFrom: '2023-01-01',
|
|
757
|
-
dateFieldTo: '2023-01-31',
|
|
758
|
-
fields: [],
|
|
759
|
-
},
|
|
760
|
-
response: { data: [{ count: 11 }] },
|
|
761
|
-
},
|
|
762
|
-
{
|
|
763
|
-
body: {
|
|
764
|
-
...lapisFilter,
|
|
765
|
-
dateFieldFrom: '2023-02-01',
|
|
766
|
-
dateFieldTo: '2023-02-28',
|
|
767
|
-
fields: [],
|
|
768
|
-
},
|
|
769
|
-
response: { data: [{ count: 12 }] },
|
|
770
|
-
},
|
|
771
|
-
]);
|
|
618
|
+
);
|
|
772
619
|
|
|
773
620
|
lapisRequestMocks.multipleMutations(
|
|
774
621
|
[
|
|
@@ -821,6 +668,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
821
668
|
],
|
|
822
669
|
dateRanges,
|
|
823
670
|
mutations: ['otherSequenceName:G234C', 'sequenceName:A123T'],
|
|
671
|
+
totalCountsByDateRange: [11, 12],
|
|
824
672
|
},
|
|
825
673
|
},
|
|
826
674
|
},
|
|
@@ -839,12 +687,12 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
839
687
|
|
|
840
688
|
expect(mutationOverTimeData.getAsArray()).to.deep.equal([
|
|
841
689
|
[
|
|
842
|
-
{ type: '
|
|
843
|
-
{ type: '
|
|
690
|
+
{ type: 'valueWithCoverage', count: 2, coverage: 10, totalCount: 11 },
|
|
691
|
+
{ type: 'valueWithCoverage', count: 3, coverage: 10, totalCount: 12 },
|
|
844
692
|
],
|
|
845
693
|
[
|
|
846
|
-
{ type: '
|
|
847
|
-
{ type: '
|
|
694
|
+
{ type: 'valueWithCoverage', count: 4, coverage: 10, totalCount: 11 },
|
|
695
|
+
{ type: 'valueWithCoverage', count: 5, coverage: 10, totalCount: 12 },
|
|
848
696
|
],
|
|
849
697
|
]);
|
|
850
698
|
|
|
@@ -861,14 +709,12 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
861
709
|
const lapisFilter = { field1: 'value1', field2: 'value2' };
|
|
862
710
|
const dateField = 'dateField';
|
|
863
711
|
|
|
864
|
-
lapisRequestMocks.
|
|
712
|
+
lapisRequestMocks.aggregated(
|
|
713
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
865
714
|
{
|
|
866
|
-
|
|
867
|
-
response: {
|
|
868
|
-
data: [],
|
|
869
|
-
},
|
|
715
|
+
data: [],
|
|
870
716
|
},
|
|
871
|
-
|
|
717
|
+
);
|
|
872
718
|
|
|
873
719
|
lapisRequestMocks.mutationsOverTime(
|
|
874
720
|
[
|
|
@@ -884,6 +730,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
884
730
|
data: [],
|
|
885
731
|
dateRanges: [],
|
|
886
732
|
mutations: [],
|
|
733
|
+
totalCountsByDateRange: [],
|
|
887
734
|
},
|
|
888
735
|
},
|
|
889
736
|
},
|
|
@@ -913,35 +760,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
913
760
|
const lapisFilter = { field1: 'value1', field2: 'value2' };
|
|
914
761
|
const dateField = 'dateField';
|
|
915
762
|
|
|
916
|
-
lapisRequestMocks.
|
|
763
|
+
lapisRequestMocks.aggregated(
|
|
764
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
917
765
|
{
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
{ count: 2, [dateField]: '2023-02-15' },
|
|
923
|
-
],
|
|
924
|
-
},
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
body: {
|
|
928
|
-
...lapisFilter,
|
|
929
|
-
dateFieldFrom: '2023-01-01',
|
|
930
|
-
dateFieldTo: '2023-01-31',
|
|
931
|
-
fields: [],
|
|
932
|
-
},
|
|
933
|
-
response: { data: [{ count: 11 }] },
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
body: {
|
|
937
|
-
...lapisFilter,
|
|
938
|
-
dateFieldFrom: '2023-02-01',
|
|
939
|
-
dateFieldTo: '2023-02-28',
|
|
940
|
-
fields: [],
|
|
941
|
-
},
|
|
942
|
-
response: { data: [{ count: 12 }] },
|
|
766
|
+
data: [
|
|
767
|
+
{ count: 1, [dateField]: '2023-01-05' },
|
|
768
|
+
{ count: 2, [dateField]: '2023-02-15' },
|
|
769
|
+
],
|
|
943
770
|
},
|
|
944
|
-
|
|
771
|
+
);
|
|
945
772
|
|
|
946
773
|
lapisRequestMocks.multipleMutations(
|
|
947
774
|
[
|
|
@@ -994,6 +821,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
994
821
|
],
|
|
995
822
|
dateRanges,
|
|
996
823
|
mutations: ['A122T', 'otherSequenceName:G234C'],
|
|
824
|
+
totalCountsByDateRange: [11, 12],
|
|
997
825
|
},
|
|
998
826
|
},
|
|
999
827
|
},
|
|
@@ -1017,8 +845,8 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
1017
845
|
{ type: 'belowThreshold', totalCount: 12 },
|
|
1018
846
|
],
|
|
1019
847
|
[
|
|
1020
|
-
{ type: '
|
|
1021
|
-
{ type: '
|
|
848
|
+
{ type: 'valueWithCoverage', count: 2, coverage: 10, totalCount: 11 },
|
|
849
|
+
{ type: 'valueWithCoverage', count: 3, coverage: 10, totalCount: 12 },
|
|
1022
850
|
],
|
|
1023
851
|
]);
|
|
1024
852
|
|
|
@@ -1035,35 +863,15 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
1035
863
|
const lapisFilter = { field1: 'value1', field2: 'value2' };
|
|
1036
864
|
const dateField = 'dateField';
|
|
1037
865
|
|
|
1038
|
-
lapisRequestMocks.
|
|
1039
|
-
{
|
|
1040
|
-
body: { ...lapisFilter, fields: [dateField] },
|
|
1041
|
-
response: {
|
|
1042
|
-
data: [
|
|
1043
|
-
{ count: 1, [dateField]: '2023-01-05' },
|
|
1044
|
-
{ count: 2, [dateField]: '2023-02-15' },
|
|
1045
|
-
],
|
|
1046
|
-
},
|
|
1047
|
-
},
|
|
866
|
+
lapisRequestMocks.aggregated(
|
|
867
|
+
{ ...lapisFilter, fields: [dateField] },
|
|
1048
868
|
{
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
fields: [],
|
|
1054
|
-
},
|
|
1055
|
-
response: { data: [{ count: 11 }] },
|
|
869
|
+
data: [
|
|
870
|
+
{ count: 1, [dateField]: '2023-01-05' },
|
|
871
|
+
{ count: 2, [dateField]: '2023-02-15' },
|
|
872
|
+
],
|
|
1056
873
|
},
|
|
1057
|
-
|
|
1058
|
-
body: {
|
|
1059
|
-
...lapisFilter,
|
|
1060
|
-
dateFieldFrom: '2023-02-01',
|
|
1061
|
-
dateFieldTo: '2023-02-28',
|
|
1062
|
-
fields: [],
|
|
1063
|
-
},
|
|
1064
|
-
response: { data: [{ count: 12 }] },
|
|
1065
|
-
},
|
|
1066
|
-
]);
|
|
874
|
+
);
|
|
1067
875
|
|
|
1068
876
|
lapisRequestMocks.multipleMutations(
|
|
1069
877
|
[
|
|
@@ -1116,6 +924,7 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
1116
924
|
],
|
|
1117
925
|
dateRanges,
|
|
1118
926
|
mutations: ['A122T', 'otherSequenceName:G234C'],
|
|
927
|
+
totalCountsByDateRange: [11, 12],
|
|
1119
928
|
},
|
|
1120
929
|
},
|
|
1121
930
|
},
|
|
@@ -1139,8 +948,8 @@ describe('queryMutationsOverTimeNewEndpoint', () => {
|
|
|
1139
948
|
{ type: 'belowThreshold', totalCount: 12 },
|
|
1140
949
|
],
|
|
1141
950
|
[
|
|
1142
|
-
{ type: '
|
|
1143
|
-
{ type: '
|
|
951
|
+
{ type: 'valueWithCoverage', count: 2, coverage: 10, totalCount: 11 },
|
|
952
|
+
{ type: 'valueWithCoverage', count: 3, coverage: 10, totalCount: 12 },
|
|
1144
953
|
],
|
|
1145
954
|
]);
|
|
1146
955
|
|
|
@@ -131,7 +131,7 @@ export class MutationComparisonComponent extends PreactLitAdapterWithGridJsStyle
|
|
|
131
131
|
|
|
132
132
|
declare global {
|
|
133
133
|
interface HTMLElementTagNameMap {
|
|
134
|
-
'gs-mutation-comparison
|
|
134
|
+
'gs-mutation-comparison': MutationComparisonComponent;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -139,7 +139,7 @@ declare global {
|
|
|
139
139
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
140
140
|
namespace JSX {
|
|
141
141
|
interface IntrinsicElements {
|
|
142
|
-
'gs-mutation-comparison
|
|
142
|
+
'gs-mutation-comparison': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}
|