@genspectrum/dashboard-components 0.6.13 → 0.6.14
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/README.md +29 -0
- package/custom-elements.json +11 -11
- package/dist/dashboard-components.js +8213 -37918
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +7 -7
- package/dist/style.css +1 -1
- package/package.json +7 -6
- package/src/operator/FetchAggregatedOperator.ts +2 -7
- package/src/preact/components/info.tsx +1 -1
- package/src/preact/components/percent-intput.tsx +7 -2
- package/src/preact/components/proportion-selector.tsx +12 -2
- package/src/preact/dateRangeSelector/date-range-selector.tsx +4 -4
- package/src/preact/lineageFilter/lineage-filter.tsx +2 -2
- package/src/preact/locationFilter/location-filter.tsx +2 -2
- package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_01.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_02.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_03.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_04.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_05.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_06.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_07.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_20_01_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_21_01_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_22_01_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_23_01_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_24_01_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_25_01_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_26_01_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_tooManyMutations_total.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_week3_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_week4_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_week5_2024.json +13 -0
- package/src/preact/mutationsOverTime/__mockData__/aggregated_week6_2024.json +13 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +56 -8
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +4 -2
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +135 -0
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +2 -2
- package/src/preact/textInput/text-input.tsx +2 -2
- package/src/query/queryMutationsOverTime.spec.ts +210 -64
- package/src/query/queryMutationsOverTime.ts +10 -2
- package/src/web-components/input/gs-date-range-selector.tsx +24 -4
- package/src/web-components/input/gs-lineage-filter.tsx +15 -1
- package/src/web-components/input/gs-location-filter.tsx +13 -1
- package/src/web-components/input/gs-mutation-filter.tsx +1 -0
- package/src/web-components/input/gs-text-input.tsx +13 -1
- package/src/web-components/visualization/gs-aggregate.tsx +17 -1
- package/src/web-components/visualization/gs-mutation-comparison.tsx +9 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +271 -0
- package/src/web-components/visualization/gs-mutations-over-time.tsx +7 -0
- package/src/web-components/visualization/gs-mutations.tsx +11 -5
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +15 -0
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -9
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +26 -8
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +43 -5
- package/standalone-bundle/dashboard-components.js +30887 -0
- package/standalone-bundle/dashboard-components.js.map +1 -0
|
@@ -990,21 +990,21 @@ declare global {
|
|
|
990
990
|
|
|
991
991
|
declare global {
|
|
992
992
|
interface HTMLElementTagNameMap {
|
|
993
|
-
'gs-
|
|
993
|
+
'gs-aggregate-component': AggregateComponent;
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
|
|
998
998
|
declare global {
|
|
999
999
|
interface HTMLElementTagNameMap {
|
|
1000
|
-
'gs-
|
|
1000
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
1004
|
|
|
1005
1005
|
declare global {
|
|
1006
1006
|
interface HTMLElementTagNameMap {
|
|
1007
|
-
'gs-
|
|
1007
|
+
'gs-mutations-over-time-component': MutationsOverTimeComponent;
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
@@ -1021,20 +1021,20 @@ declare global {
|
|
|
1021
1021
|
|
|
1022
1022
|
declare global {
|
|
1023
1023
|
interface HTMLElementTagNameMap {
|
|
1024
|
-
'gs-
|
|
1024
|
+
'gs-text-input': TextInputComponent;
|
|
1025
1025
|
}
|
|
1026
1026
|
interface HTMLElementEventMap {
|
|
1027
|
-
'gs-
|
|
1027
|
+
'gs-text-input-changed': CustomEvent<Record<string, string>>;
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
1031
|
|
|
1032
1032
|
declare global {
|
|
1033
1033
|
interface HTMLElementTagNameMap {
|
|
1034
|
-
'gs-
|
|
1034
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1035
1035
|
}
|
|
1036
1036
|
interface HTMLElementEventMap {
|
|
1037
|
-
'gs-
|
|
1037
|
+
'gs-location-changed': CustomEvent<Record<string, string>>;
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
|
package/dist/style.css
CHANGED
|
@@ -376,7 +376,7 @@ input[type="range"] {
|
|
|
376
376
|
background-color: #C6C6C6;
|
|
377
377
|
pointer-events: none;
|
|
378
378
|
}/*
|
|
379
|
-
! tailwindcss v3.4.
|
|
379
|
+
! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com
|
|
380
380
|
*//*
|
|
381
381
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
382
382
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genspectrum/dashboard-components",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14",
|
|
4
4
|
"description": "GenSpectrum web components for building dashboards",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -16,18 +16,19 @@
|
|
|
16
16
|
"require": "./dist/dashboard-components.js",
|
|
17
17
|
"types": "./dist/genspectrum-components.d.ts"
|
|
18
18
|
},
|
|
19
|
-
"./custom-elements.json": "./custom
|
|
19
|
+
"./custom-elements.json": "./custom-elements.json",
|
|
20
20
|
"./package.json": "./package.json",
|
|
21
21
|
"./style.css": "./dist/style.css"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist",
|
|
25
|
+
"standalone-bundle",
|
|
25
26
|
"src",
|
|
26
27
|
"custom-elements.json",
|
|
27
28
|
"package.json"
|
|
28
29
|
],
|
|
29
30
|
"scripts": {
|
|
30
|
-
"build": "vite --config vite.release.config.ts build && npm run generate-manifest",
|
|
31
|
+
"build": "vite --config vite.release.config.ts build && npm run generate-manifest && vite --config vite.release-standalone.config.ts build",
|
|
31
32
|
"build-and-pack": "npm run build && npm pack | xargs -I {} cp {} genspectrum-dashboard-components.tgz",
|
|
32
33
|
"test": "vitest",
|
|
33
34
|
"lint": "npm run lint:lit-analyzer && npm run lint:eslint",
|
|
@@ -67,9 +68,6 @@
|
|
|
67
68
|
"dayjs": "^1.11.10",
|
|
68
69
|
"flatpickr": "^4.6.13",
|
|
69
70
|
"gridjs": "^6.2.0",
|
|
70
|
-
"@iconify-json/mdi": "^1.1.67",
|
|
71
|
-
"@iconify-json/mdi-light": "^1.1.10",
|
|
72
|
-
"@iconify/tailwind": "^1.1.1",
|
|
73
71
|
"lit": "^3.1.3",
|
|
74
72
|
"object-hash": "^3.0.0",
|
|
75
73
|
"preact": "^10.20.1",
|
|
@@ -77,6 +75,9 @@
|
|
|
77
75
|
},
|
|
78
76
|
"devDependencies": {
|
|
79
77
|
"@custom-elements-manifest/analyzer": "^0.10.2",
|
|
78
|
+
"@iconify-json/mdi": "^1.1.67",
|
|
79
|
+
"@iconify-json/mdi-light": "^1.1.10",
|
|
80
|
+
"@iconify/tailwind": "^1.1.2",
|
|
80
81
|
"@playwright/test": "^1.43.1",
|
|
81
82
|
"@storybook/addon-actions": "^8.0.9",
|
|
82
83
|
"@storybook/addon-essentials": "^8.0.9",
|
|
@@ -5,16 +5,11 @@ import { type AggregatedItem } from '../lapisApi/lapisTypes';
|
|
|
5
5
|
import { type LapisFilter } from '../types';
|
|
6
6
|
|
|
7
7
|
export class FetchAggregatedOperator<Fields extends Record<string, unknown>>
|
|
8
|
-
implements
|
|
9
|
-
Operator<
|
|
10
|
-
Fields & {
|
|
11
|
-
count: number;
|
|
12
|
-
}
|
|
13
|
-
>
|
|
8
|
+
implements Operator<Fields & { count: number }>
|
|
14
9
|
{
|
|
15
10
|
constructor(
|
|
16
11
|
private filter: LapisFilter,
|
|
17
|
-
private fields: string[],
|
|
12
|
+
private fields: string[] = [],
|
|
18
13
|
) {}
|
|
19
14
|
|
|
20
15
|
async evaluate(lapisUrl: string, signal?: AbortSignal): Promise<Dataset<Fields & { count: number }>> {
|
|
@@ -124,7 +124,7 @@ function generateFullExampleCode(componentCode: string, componentName: string) {
|
|
|
124
124
|
const storyBookPath = `/docs/visualization-${componentName}--docs`;
|
|
125
125
|
return `<html>
|
|
126
126
|
<head>
|
|
127
|
-
<script type="module" src="https://unpkg.com/@genspectrum/dashboard-components@latest/
|
|
127
|
+
<script type="module" src="https://unpkg.com/@genspectrum/dashboard-components@latest/standalone-bundle/dashboard-components.js"></script>
|
|
128
128
|
<link rel="stylesheet" href="https://unpkg.com/@genspectrum/dashboard-components@latest/dist/style.css" />
|
|
129
129
|
</head>
|
|
130
130
|
|
|
@@ -4,13 +4,18 @@ import { useEffect, useState } from 'preact/hooks';
|
|
|
4
4
|
export type PercentInputProps = {
|
|
5
5
|
percentage: number;
|
|
6
6
|
setPercentage: (percentage: number) => void;
|
|
7
|
+
indicateError?: boolean;
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
const percentageInRange = (percentage: number) => {
|
|
10
11
|
return percentage <= 100 && percentage >= 0;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
export const PercentInput: FunctionComponent<PercentInputProps> = ({
|
|
14
|
+
export const PercentInput: FunctionComponent<PercentInputProps> = ({
|
|
15
|
+
percentage,
|
|
16
|
+
setPercentage,
|
|
17
|
+
indicateError = false,
|
|
18
|
+
}) => {
|
|
14
19
|
const [internalPercentage, setInternalPercentage] = useState(percentage);
|
|
15
20
|
|
|
16
21
|
useEffect(() => {
|
|
@@ -33,7 +38,7 @@ export const PercentInput: FunctionComponent<PercentInputProps> = ({ percentage,
|
|
|
33
38
|
setInternalPercentage(value);
|
|
34
39
|
};
|
|
35
40
|
|
|
36
|
-
const isError = !percentageInRange(internalPercentage);
|
|
41
|
+
const isError = indicateError || !percentageInRange(internalPercentage);
|
|
37
42
|
return (
|
|
38
43
|
<label className={`input input-bordered flex items-center gap-2 w-32 ${isError ? 'input-error' : ''}`}>
|
|
39
44
|
<input
|
|
@@ -57,12 +57,22 @@ export const ProportionSelector: FunctionComponent<ProportionSelectorProps> = ({
|
|
|
57
57
|
setInternalMaxProportion(newMaxProportion);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
+
const indicateError = internalMinProportion > internalMaxProportion;
|
|
61
|
+
|
|
60
62
|
return (
|
|
61
63
|
<div class='flex flex-col w-64 mb-2'>
|
|
62
64
|
<div class='flex items-center '>
|
|
63
|
-
<PercentInput
|
|
65
|
+
<PercentInput
|
|
66
|
+
percentage={internalMinProportion * 100}
|
|
67
|
+
setPercentage={updateMinPercentage}
|
|
68
|
+
indicateError={indicateError}
|
|
69
|
+
/>
|
|
64
70
|
<div class='m-2'>-</div>
|
|
65
|
-
<PercentInput
|
|
71
|
+
<PercentInput
|
|
72
|
+
percentage={internalMaxProportion * 100}
|
|
73
|
+
setPercentage={updateMaxPercentage}
|
|
74
|
+
indicateError={indicateError}
|
|
75
|
+
/>
|
|
66
76
|
</div>
|
|
67
77
|
<div class='my-1'>
|
|
68
78
|
<MinMaxRangeSlider
|
|
@@ -20,10 +20,10 @@ export interface DateRangeSelectorProps<CustomLabel extends string> extends Date
|
|
|
20
20
|
|
|
21
21
|
export interface DateRangeSelectorPropsInner<CustomLabel extends string> {
|
|
22
22
|
customSelectOptions: CustomSelectOption<CustomLabel>[];
|
|
23
|
-
earliestDate
|
|
24
|
-
initialValue
|
|
25
|
-
initialDateFrom
|
|
26
|
-
initialDateTo
|
|
23
|
+
earliestDate: string;
|
|
24
|
+
initialValue: PresetOptionValues | CustomLabel;
|
|
25
|
+
initialDateFrom: string;
|
|
26
|
+
initialDateTo: string;
|
|
27
27
|
dateColumn: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -12,8 +12,8 @@ import { useQuery } from '../useQuery';
|
|
|
12
12
|
|
|
13
13
|
export interface LineageFilterInnerProps {
|
|
14
14
|
lapisField: string;
|
|
15
|
-
placeholderText
|
|
16
|
-
initialValue
|
|
15
|
+
placeholderText: string;
|
|
16
|
+
initialValue: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface LineageFilterProps extends LineageFilterInnerProps {
|
|
@@ -11,8 +11,8 @@ import { ResizeContainer } from '../components/resize-container';
|
|
|
11
11
|
import { useQuery } from '../useQuery';
|
|
12
12
|
|
|
13
13
|
export interface LocationFilterInnerProps {
|
|
14
|
-
initialValue
|
|
15
|
-
placeholderText
|
|
14
|
+
initialValue: string;
|
|
15
|
+
placeholderText: string;
|
|
16
16
|
fields: string[];
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 25800
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 16673
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 7931
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 2947
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 2424
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 2890
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 0
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 456
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 533
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 1107
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 1020
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 880
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 832
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 635
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 503198
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 5213
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 5311
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 5264
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 4954
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"info": {
|
|
8
|
+
"dataVersion": "1722452937",
|
|
9
|
+
"requestId": "aede768e-d9d1-4273-9a74-992986554995",
|
|
10
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-08-02T06:57:09.319474043",
|
|
11
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -15,10 +15,12 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
15
15
|
data.set(new Substitution('someSegment', 'A', 'T', 123), yearMonthDay('2021-01-01'), {
|
|
16
16
|
count: 1,
|
|
17
17
|
proportion: 0.1,
|
|
18
|
+
totalCount: 10,
|
|
18
19
|
});
|
|
19
20
|
data.set(new Substitution('someOtherSegment', 'A', 'T', 123), yearMonthDay('2021-01-01'), {
|
|
20
21
|
count: 2,
|
|
21
22
|
proportion: 0.2,
|
|
23
|
+
totalCount: 10,
|
|
22
24
|
});
|
|
23
25
|
|
|
24
26
|
filterDisplayedSegments(
|
|
@@ -41,10 +43,12 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
41
43
|
data.set(new Substitution('someSegment', 'A', 'T', 123), yearMonthDay('2021-01-01'), {
|
|
42
44
|
count: 1,
|
|
43
45
|
proportion: 0.1,
|
|
46
|
+
totalCount: 10,
|
|
44
47
|
});
|
|
45
48
|
data.set(new Deletion('someOtherSegment', 'A', 123), yearMonthDay('2021-01-01'), {
|
|
46
49
|
count: 2,
|
|
47
50
|
proportion: 0.2,
|
|
51
|
+
totalCount: 10,
|
|
48
52
|
});
|
|
49
53
|
|
|
50
54
|
filterMutationTypes(
|
|
@@ -76,7 +80,13 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
76
80
|
|
|
77
81
|
filterProportion(data, getOverallMutationData(belowFilter), proportionInterval);
|
|
78
82
|
|
|
79
|
-
expect(
|
|
83
|
+
expect(
|
|
84
|
+
data.getAsArray({
|
|
85
|
+
count: 0,
|
|
86
|
+
proportion: 0,
|
|
87
|
+
totalCount: 10,
|
|
88
|
+
}),
|
|
89
|
+
).to.toHaveLength(0);
|
|
80
90
|
});
|
|
81
91
|
|
|
82
92
|
it('should remove mutations where overall proportion is above filter', () => {
|
|
@@ -84,7 +94,13 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
84
94
|
|
|
85
95
|
filterProportion(data, getOverallMutationData(aboveFilter), proportionInterval);
|
|
86
96
|
|
|
87
|
-
expect(
|
|
97
|
+
expect(
|
|
98
|
+
data.getAsArray({
|
|
99
|
+
count: 0,
|
|
100
|
+
proportion: 0,
|
|
101
|
+
totalCount: 10,
|
|
102
|
+
}),
|
|
103
|
+
).to.toHaveLength(0);
|
|
88
104
|
});
|
|
89
105
|
|
|
90
106
|
it('should remove mutations where overall proportion is missing', () => {
|
|
@@ -92,7 +108,13 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
92
108
|
|
|
93
109
|
filterProportion(data, getOverallMutationData(aboveFilter, someOtherMutation), proportionInterval);
|
|
94
110
|
|
|
95
|
-
expect(
|
|
111
|
+
expect(
|
|
112
|
+
data.getAsArray({
|
|
113
|
+
count: 0,
|
|
114
|
+
proportion: 0,
|
|
115
|
+
totalCount: 10,
|
|
116
|
+
}),
|
|
117
|
+
).to.toHaveLength(0);
|
|
96
118
|
});
|
|
97
119
|
|
|
98
120
|
it('should not remove mutation where overall proportion is at lower border of filter', () => {
|
|
@@ -100,7 +122,13 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
100
122
|
|
|
101
123
|
filterProportion(data, getOverallMutationData(inFilter), proportionInterval);
|
|
102
124
|
|
|
103
|
-
expect(
|
|
125
|
+
expect(
|
|
126
|
+
data.getRow(someSubstitution, {
|
|
127
|
+
count: 0,
|
|
128
|
+
proportion: 0,
|
|
129
|
+
totalCount: 10,
|
|
130
|
+
}),
|
|
131
|
+
).to.toHaveLength(2);
|
|
104
132
|
});
|
|
105
133
|
|
|
106
134
|
it('should not remove mutation where overall proportion is within filter', () => {
|
|
@@ -108,7 +136,13 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
108
136
|
|
|
109
137
|
filterProportion(data, getOverallMutationData(inFilter), proportionInterval);
|
|
110
138
|
|
|
111
|
-
expect(
|
|
139
|
+
expect(
|
|
140
|
+
data.getRow(someSubstitution, {
|
|
141
|
+
count: 0,
|
|
142
|
+
proportion: 0,
|
|
143
|
+
totalCount: 10,
|
|
144
|
+
}),
|
|
145
|
+
).to.toHaveLength(2);
|
|
112
146
|
});
|
|
113
147
|
|
|
114
148
|
it('should not remove mutation where overall proportion is at upper border of filter', () => {
|
|
@@ -116,13 +150,27 @@ describe('getFilteredMutationOverTimeData', () => {
|
|
|
116
150
|
|
|
117
151
|
filterProportion(data, getOverallMutationData(inFilter), proportionInterval);
|
|
118
152
|
|
|
119
|
-
expect(
|
|
153
|
+
expect(
|
|
154
|
+
data.getRow(someSubstitution, {
|
|
155
|
+
count: 0,
|
|
156
|
+
proportion: 0,
|
|
157
|
+
totalCount: 10,
|
|
158
|
+
}),
|
|
159
|
+
).to.toHaveLength(2);
|
|
120
160
|
});
|
|
121
161
|
|
|
122
162
|
function getMutationOverTimeData() {
|
|
123
163
|
const data = new Map2dBase<Substitution | Deletion, Temporal, MutationOverTimeMutationValue>();
|
|
124
|
-
data.set(someSubstitution, yearMonthDay('2021-01-01'), {
|
|
125
|
-
|
|
164
|
+
data.set(someSubstitution, yearMonthDay('2021-01-01'), {
|
|
165
|
+
count: 1,
|
|
166
|
+
proportion: 0.1,
|
|
167
|
+
totalCount: 10,
|
|
168
|
+
});
|
|
169
|
+
data.set(someSubstitution, yearMonthDay('2021-02-02'), {
|
|
170
|
+
count: 99,
|
|
171
|
+
proportion: 0.99,
|
|
172
|
+
totalCount: 10,
|
|
173
|
+
});
|
|
126
174
|
return data;
|
|
127
175
|
}
|
|
128
176
|
|