@genspectrum/dashboard-components 0.1.5 → 0.3.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/custom-elements.json +1161 -928
- package/dist/dashboard-components.js +663 -237
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +177 -140
- package/dist/style.css +247 -50
- package/package.json +2 -3
- package/src/constants.ts +1 -1
- package/src/lapisApi/lapisApi.ts +46 -2
- package/src/lapisApi/lapisTypes.ts +14 -0
- package/src/preact/aggregatedData/aggregate.stories.tsx +4 -2
- package/src/preact/aggregatedData/aggregate.tsx +31 -29
- package/src/preact/components/error-boundary.stories.tsx +54 -0
- package/src/preact/components/error-boundary.tsx +22 -0
- package/src/preact/components/error-display.stories.tsx +32 -4
- package/src/preact/components/error-display.tsx +48 -1
- package/src/preact/components/loading-display.stories.tsx +6 -6
- package/src/preact/components/loading-display.tsx +1 -1
- package/src/preact/components/no-data-display.tsx +5 -1
- package/src/preact/components/resize-container.tsx +5 -14
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +19 -0
- package/src/preact/dateRangeSelector/date-range-selector.tsx +38 -7
- package/src/preact/locationFilter/fetchAutocompletionList.ts +15 -1
- package/src/preact/locationFilter/location-filter.stories.tsx +23 -6
- package/src/preact/locationFilter/location-filter.tsx +28 -18
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +6 -3
- package/src/preact/mutationComparison/mutation-comparison.tsx +33 -32
- package/src/preact/mutationComparison/queryMutationData.ts +2 -3
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +18 -3
- package/src/preact/mutationFilter/mutation-filter.tsx +26 -7
- package/src/preact/mutations/mutations.stories.tsx +6 -3
- package/src/preact/mutations/mutations.tsx +28 -26
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +14 -7
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +50 -32
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +6 -3
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +46 -32
- package/src/preact/textInput/text-input.stories.tsx +26 -0
- package/src/preact/textInput/text-input.tsx +25 -3
- package/src/query/queryPrevalenceOverTime.ts +4 -10
- package/src/types.ts +4 -1
- package/src/web-components/ResizeContainer.mdx +13 -0
- package/src/web-components/app.stories.ts +1 -2
- package/src/web-components/app.ts +7 -3
- package/src/web-components/index.ts +1 -1
- package/src/web-components/input/{date-range-selector-component.stories.ts → gs-date-range-selector.stories.ts} +29 -4
- package/src/web-components/input/{date-range-selector-component.tsx → gs-date-range-selector.tsx} +32 -10
- package/src/web-components/input/{location-filter-component.stories.ts → gs-location-filter.stories.ts} +32 -5
- package/src/web-components/input/{location-filter-component.tsx → gs-location-filter.tsx} +11 -1
- package/src/web-components/input/{mutation-filter-component.stories.ts → gs-mutation-filter.stories.ts} +23 -4
- package/src/web-components/input/gs-mutation-filter.tsx +126 -0
- package/src/web-components/input/{text-input-component.stories.ts → gs-text-input.stories.ts} +34 -6
- package/src/web-components/input/{text-input-component.tsx → gs-text-input.tsx} +16 -4
- package/src/web-components/input/index.ts +4 -4
- package/src/web-components/input/introduction.mdx +11 -0
- package/src/web-components/introduction.mdx +15 -0
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +26 -0
- package/src/web-components/{display/aggregate-component.stories.ts → visualization/gs-aggregate.stories.ts} +23 -11
- package/src/web-components/visualization/gs-aggregate.tsx +88 -0
- package/src/web-components/{display/mutation-comparison-component.stories.ts → visualization/gs-mutation-comparison.stories.ts} +21 -16
- package/src/web-components/{display/mutation-comparison-component.tsx → visualization/gs-mutation-comparison.tsx} +27 -18
- package/src/web-components/{display/mutations-component.stories.ts → visualization/gs-mutations.stories.ts} +20 -15
- package/src/web-components/{display/mutations-component.tsx → visualization/gs-mutations.tsx} +20 -10
- package/src/web-components/{display/prevalence-over-time-component.stories.ts → visualization/gs-prevalence-over-time.stories.ts} +29 -20
- package/src/web-components/{display/prevalence-over-time-component.tsx → visualization/gs-prevalence-over-time.tsx} +47 -22
- package/src/web-components/{display/relative-growth-advantage-component.stories.ts → visualization/gs-relative-growth-advantage.stories.ts} +12 -7
- package/src/web-components/{display/relative-growth-advantage-component.tsx → visualization/gs-relative-growth-advantage.tsx} +21 -9
- package/src/web-components/visualization/index.ts +5 -0
- package/src/web-components/display/aggregate-component.tsx +0 -72
- package/src/web-components/display/index.ts +0 -5
- package/src/web-components/input/mutation-filter-component.tsx +0 -83
|
@@ -10,43 +10,53 @@ import { TemplateResult } from 'lit-html';
|
|
|
10
10
|
/**
|
|
11
11
|
* ## Context
|
|
12
12
|
*
|
|
13
|
-
* This component displays aggregated data, which can provide an overview of the underlying data.
|
|
13
|
+
* This component displays aggregated data in a table, which can provide an overview of the underlying data.
|
|
14
14
|
*
|
|
15
|
-
* It expects a list of fields to aggregate by and a filter to apply to the data.
|
|
15
|
+
* It expects a list of `fields` to aggregate by and a `filter` to apply to the data.
|
|
16
|
+
*
|
|
17
|
+
* ## Views
|
|
18
|
+
*
|
|
19
|
+
* ### Table View
|
|
20
|
+
*
|
|
21
|
+
* In the table view, the data is presented in a table format where each field is a column,
|
|
22
|
+
* along with the aggregated value and its proportion.
|
|
23
|
+
* The proportion represents the ratio of the aggregated value to the total count of the data
|
|
24
|
+
* (considering the applied filter).
|
|
16
25
|
*/
|
|
17
26
|
export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles {
|
|
18
27
|
/**
|
|
19
28
|
* The fields to aggregate by.
|
|
29
|
+
* Every field will be a table column.
|
|
30
|
+
* Every field must exist in the backing LAPIS instance.
|
|
31
|
+
*
|
|
32
|
+
* If left empty, the component will only show the absolute count of the provided `filter` and proportion `100%`.
|
|
20
33
|
*/
|
|
21
34
|
fields: string[];
|
|
22
35
|
/**
|
|
23
|
-
*
|
|
24
|
-
* In the table view, the data is presented in a table format where each field is a column,
|
|
25
|
-
* along with the aggregated value and its proportion.
|
|
26
|
-
* The proportion represents the ratio of the aggregated value to the total count of the data
|
|
27
|
-
* (considering the applied filter).
|
|
36
|
+
* A list of tabs with views that this component should provide.
|
|
28
37
|
*/
|
|
29
38
|
views: View[];
|
|
30
39
|
/**
|
|
31
40
|
* The filter to apply to the data.
|
|
41
|
+
* It must be a valid LAPIS filter object.
|
|
32
42
|
*/
|
|
33
43
|
filter: LapisFilter;
|
|
34
44
|
/**
|
|
35
|
-
* The
|
|
45
|
+
* The width of the component.
|
|
36
46
|
*
|
|
37
|
-
*
|
|
47
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
48
|
+
*/
|
|
49
|
+
width: string;
|
|
50
|
+
/**
|
|
51
|
+
* The height of the component.
|
|
38
52
|
*
|
|
39
|
-
*
|
|
40
|
-
* If the unit is %, the size will be relative to the container of the component.
|
|
53
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
41
54
|
*/
|
|
42
|
-
|
|
43
|
-
width?: string;
|
|
44
|
-
height?: string;
|
|
45
|
-
} | undefined;
|
|
55
|
+
height: string;
|
|
46
56
|
/**
|
|
47
57
|
* The headline of the component. Set to an empty string to hide the headline.
|
|
48
58
|
*/
|
|
49
|
-
headline: string
|
|
59
|
+
headline: string;
|
|
50
60
|
render(): JSX_2.Element;
|
|
51
61
|
}
|
|
52
62
|
|
|
@@ -68,6 +78,8 @@ export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
68
78
|
*/
|
|
69
79
|
export declare class App extends LitElement {
|
|
70
80
|
/**
|
|
81
|
+
* Required.
|
|
82
|
+
*
|
|
71
83
|
* The URL of the LAPIS instance that all children of this component will use.
|
|
72
84
|
*/
|
|
73
85
|
lapis: string;
|
|
@@ -79,7 +91,8 @@ export declare class App extends LitElement {
|
|
|
79
91
|
|
|
80
92
|
/**
|
|
81
93
|
* ## Context
|
|
82
|
-
* This component is a group of input fields designed to specify
|
|
94
|
+
* This component is a group of input fields designed to specify date range filters
|
|
95
|
+
* for a given date column of this Lapis instance. It consists of 3 fields:
|
|
83
96
|
*
|
|
84
97
|
* - a select field to choose a predefined date range,
|
|
85
98
|
* - an input field with an attached date picker for the start date,
|
|
@@ -89,12 +102,21 @@ export declare class App extends LitElement {
|
|
|
89
102
|
* Setting a value in either of the date pickers will set the select field to "custom",
|
|
90
103
|
* which represents an arbitrary date range.
|
|
91
104
|
*
|
|
92
|
-
* @fires {CustomEvent<{
|
|
105
|
+
* @fires {CustomEvent<{ `${dateColumn}From`: string; `${dateColumn}To`: string; }>} gs-date-range-changed
|
|
93
106
|
* Fired when:
|
|
94
107
|
* - The select field is changed,
|
|
95
108
|
* - A date is selected in either of the date pickers,
|
|
96
109
|
* - A date was typed into either of the date input fields, and the input field loses focus ("on blur").
|
|
97
110
|
* Contains the dates in the format `YYYY-MM-DD`.
|
|
111
|
+
*
|
|
112
|
+
* Example: For `dateColumn = yourDate`, an event with `detail` containing
|
|
113
|
+
* ```
|
|
114
|
+
* {
|
|
115
|
+
* yourDataFrom: "2021-01-01",
|
|
116
|
+
* yourDataTo: "2021-12-31"
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
* will be fired.
|
|
98
120
|
*/
|
|
99
121
|
export declare class DateRangeSelectorComponent extends PreactLitAdapter {
|
|
100
122
|
/**
|
|
@@ -111,39 +133,27 @@ export declare class DateRangeSelectorComponent extends PreactLitAdapter {
|
|
|
111
133
|
/**
|
|
112
134
|
* The `dateFrom` value to use in the `allTimes` preset in the format `YYYY-MM-DD`.
|
|
113
135
|
*/
|
|
114
|
-
earliestDate: string
|
|
136
|
+
earliestDate: string;
|
|
115
137
|
/**
|
|
116
138
|
* The initial value to use for this date range selector.
|
|
117
139
|
* Must be a valid label from the preset labels or a `label` given in the `customSelectOptions`.
|
|
118
140
|
*
|
|
119
141
|
* If the value is invalid, the component will default to `'last6Months'`.
|
|
120
142
|
*/
|
|
121
|
-
initialValue: 'custom' | 'allTimes' | 'last2Weeks' | 'lastMonth' | 'last2Months' | 'last3Months' | 'last6Months' | string
|
|
143
|
+
initialValue: 'custom' | 'allTimes' | 'last2Weeks' | 'lastMonth' | 'last2Months' | 'last3Months' | 'last6Months' | string;
|
|
144
|
+
/**
|
|
145
|
+
* The width of the component.
|
|
146
|
+
*
|
|
147
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
148
|
+
*/
|
|
149
|
+
width: string;
|
|
150
|
+
/**
|
|
151
|
+
* The name of the column in LAPIS that contains the date information.
|
|
152
|
+
*/
|
|
153
|
+
dateColumn: string;
|
|
122
154
|
render(): JSX_2.Element;
|
|
123
155
|
}
|
|
124
156
|
|
|
125
|
-
declare class Deletion implements Mutation {
|
|
126
|
-
readonly segment: string | undefined;
|
|
127
|
-
readonly valueAtReference: string | undefined;
|
|
128
|
-
readonly position: number;
|
|
129
|
-
readonly code: string;
|
|
130
|
-
constructor(segment: string | undefined, valueAtReference: string | undefined, position: number);
|
|
131
|
-
equals(other: Mutation): boolean;
|
|
132
|
-
toString(): string;
|
|
133
|
-
static parse(mutationStr: string): Deletion | null;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
declare class Insertion implements Mutation {
|
|
137
|
-
readonly segment: string | undefined;
|
|
138
|
-
readonly position: number;
|
|
139
|
-
readonly insertedSymbols: string;
|
|
140
|
-
readonly code: string;
|
|
141
|
-
constructor(segment: string | undefined, position: number, insertedSymbols: string);
|
|
142
|
-
equals(other: Mutation): boolean;
|
|
143
|
-
toString(): string;
|
|
144
|
-
static parse(mutationStr: string): Insertion | null;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
157
|
declare type LapisFilter = Record<string, string | number | null | boolean>;
|
|
148
158
|
|
|
149
159
|
/**
|
|
@@ -180,24 +190,26 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
|
|
|
180
190
|
*/
|
|
181
191
|
initialValue: string;
|
|
182
192
|
/**
|
|
193
|
+
* Required.
|
|
194
|
+
*
|
|
183
195
|
* The fields to display in the location filter, in hierarchical order.
|
|
184
196
|
* The top-level field should be the first entry in the array.
|
|
185
197
|
* This component assumes that the values for each field form a strict hierarchy
|
|
186
198
|
* (e.g., `fields = ['continent', 'country', 'city']`).
|
|
187
199
|
*/
|
|
188
200
|
fields: string[];
|
|
201
|
+
/**
|
|
202
|
+
* The width of the component.
|
|
203
|
+
*
|
|
204
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
205
|
+
*/
|
|
206
|
+
width: string;
|
|
189
207
|
render(): JSX_2.Element;
|
|
190
208
|
}
|
|
191
209
|
|
|
192
|
-
declare interface Mutation {
|
|
193
|
-
readonly segment: string | undefined;
|
|
194
|
-
readonly position: number;
|
|
195
|
-
readonly code: string;
|
|
196
|
-
equals(other: Mutation): boolean;
|
|
197
|
-
toString(): string;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
210
|
/**
|
|
211
|
+
* ## Context
|
|
212
|
+
*
|
|
201
213
|
* This component allows to compare mutations between different variants.
|
|
202
214
|
* A variant is defined by its LAPIS filter.
|
|
203
215
|
*
|
|
@@ -222,6 +234,8 @@ declare interface Mutation {
|
|
|
222
234
|
*/
|
|
223
235
|
export declare class MutationComparisonComponent extends PreactLitAdapterWithGridJsStyles {
|
|
224
236
|
/**
|
|
237
|
+
* Required.
|
|
238
|
+
*
|
|
225
239
|
* An array of variants to compare.
|
|
226
240
|
*
|
|
227
241
|
* The `lapisFilter` will be sent as is to LAPIS to filter the mutation data.
|
|
@@ -243,21 +257,21 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
|
|
|
243
257
|
*/
|
|
244
258
|
views: ('table' | 'venn')[];
|
|
245
259
|
/**
|
|
246
|
-
* The
|
|
260
|
+
* The width of the component.
|
|
247
261
|
*
|
|
248
|
-
*
|
|
262
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
263
|
+
*/
|
|
264
|
+
width: string;
|
|
265
|
+
/**
|
|
266
|
+
* The height of the component.
|
|
249
267
|
*
|
|
250
|
-
*
|
|
251
|
-
* If the unit is %, the size will be relative to the container of the component.
|
|
268
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
252
269
|
*/
|
|
253
|
-
|
|
254
|
-
width?: string;
|
|
255
|
-
height?: string;
|
|
256
|
-
} | undefined;
|
|
270
|
+
height: string;
|
|
257
271
|
/**
|
|
258
272
|
* The headline of the component. Set to an empty string to hide the headline.
|
|
259
273
|
*/
|
|
260
|
-
headline: string
|
|
274
|
+
headline: string;
|
|
261
275
|
render(): JSX_2.Element;
|
|
262
276
|
}
|
|
263
277
|
|
|
@@ -270,22 +284,30 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
|
|
|
270
284
|
* All previously selected mutations are displayed at the input field and added to the event.
|
|
271
285
|
* Users can remove a mutation by clicking the 'x' button next to the mutation.
|
|
272
286
|
*
|
|
287
|
+
* ## Input Validation
|
|
288
|
+
*
|
|
273
289
|
* Validation of the input is performed according to the following rules:
|
|
274
290
|
*
|
|
291
|
+
* ### Mutations
|
|
292
|
+
*
|
|
275
293
|
* Mutations have to conform to the following format: `<gene/segment>:<symbol at reference><position><Substituted symbol/Deletion>`
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
294
|
+
* - Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome.
|
|
295
|
+
* (Optional for elements with only one gene/segment)
|
|
296
|
+
* - Symbol at reference: The symbol at the reference position. (Optional)
|
|
297
|
+
* - Position: The position of the mutation. (Required)
|
|
298
|
+
* - Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)
|
|
299
|
+
*
|
|
300
|
+
* Examples: `S:614G`, `614G`, `614-`, `614G`
|
|
301
|
+
*
|
|
302
|
+
* ### Insertions
|
|
282
303
|
*
|
|
283
304
|
* Insertions have to conform to the following format: `ins_<gene/segment>:<position>:<Inserted symbols>`
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
305
|
+
* - Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome.
|
|
306
|
+
* (Optional for elements with only one gene/segment)
|
|
307
|
+
* - Position: The position of the insertion. (Required)
|
|
308
|
+
* - Inserted symbols: The symbols that are inserted. (Required)
|
|
309
|
+
*
|
|
310
|
+
* Examples: `ins_S:614:G`, `ins_614:G`
|
|
289
311
|
*
|
|
290
312
|
* @fires {CustomEvent<{
|
|
291
313
|
* nucleotideMutations: string[],
|
|
@@ -310,15 +332,33 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
|
|
|
310
332
|
export declare class MutationFilterComponent extends PreactLitAdapter {
|
|
311
333
|
/**
|
|
312
334
|
* The initial value to use for this mutation filter.
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
|
|
335
|
+
* All values provided must be valid mutations or insertions.
|
|
336
|
+
* Invalid values will be ignored.
|
|
337
|
+
*/
|
|
338
|
+
initialValue: {
|
|
339
|
+
nucleotideMutations: string[];
|
|
340
|
+
aminoAcidMutations: string[];
|
|
341
|
+
nucleotideInsertions: string[];
|
|
342
|
+
aminoAcidInsertions: string[];
|
|
343
|
+
} | string[] | undefined;
|
|
344
|
+
/**
|
|
345
|
+
* The width of the component.
|
|
346
|
+
*
|
|
347
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
316
348
|
*/
|
|
317
|
-
|
|
349
|
+
width: string;
|
|
350
|
+
/**
|
|
351
|
+
* The height of the component.
|
|
352
|
+
*
|
|
353
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
354
|
+
*/
|
|
355
|
+
height: string;
|
|
318
356
|
render(): JSX_2.Element;
|
|
319
357
|
}
|
|
320
358
|
|
|
321
359
|
/**
|
|
360
|
+
* ## Context
|
|
361
|
+
*
|
|
322
362
|
* This component displays mutations (substitutions, deletions and insertions) for a given variant.
|
|
323
363
|
*
|
|
324
364
|
* ## Views
|
|
@@ -345,6 +385,8 @@ export declare class MutationFilterComponent extends PreactLitAdapter {
|
|
|
345
385
|
*/
|
|
346
386
|
export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles {
|
|
347
387
|
/**
|
|
388
|
+
* Required.
|
|
389
|
+
*
|
|
348
390
|
* The `variant` will be sent as is to LAPIS to filter the mutation data.
|
|
349
391
|
* It must be a valid LAPIS filter object.
|
|
350
392
|
*/
|
|
@@ -358,21 +400,21 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
358
400
|
*/
|
|
359
401
|
views: ('table' | 'grid' | 'insertions')[];
|
|
360
402
|
/**
|
|
361
|
-
* The
|
|
403
|
+
* The width of the component.
|
|
362
404
|
*
|
|
363
|
-
*
|
|
405
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
406
|
+
*/
|
|
407
|
+
width: string;
|
|
408
|
+
/**
|
|
409
|
+
* The height of the component.
|
|
364
410
|
*
|
|
365
|
-
*
|
|
366
|
-
* If the unit is %, the size will be relative to the container of the component.
|
|
411
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
367
412
|
*/
|
|
368
|
-
|
|
369
|
-
width?: string;
|
|
370
|
-
height?: string;
|
|
371
|
-
} | undefined;
|
|
413
|
+
height: string;
|
|
372
414
|
/**
|
|
373
415
|
* The headline of the component. Set to an empty string to hide the headline.
|
|
374
416
|
*/
|
|
375
|
-
headline: string
|
|
417
|
+
headline: string;
|
|
376
418
|
render(): JSX_2.Element;
|
|
377
419
|
}
|
|
378
420
|
|
|
@@ -389,6 +431,8 @@ declare abstract class PreactLitAdapterWithGridJsStyles extends PreactLitAdapter
|
|
|
389
431
|
}
|
|
390
432
|
|
|
391
433
|
/**
|
|
434
|
+
* ## Context
|
|
435
|
+
*
|
|
392
436
|
* This component displays the prevalence over time of one or more variants.
|
|
393
437
|
* The prevalence is calculated as the ratio of the number of cases of each variant given as `numerator`
|
|
394
438
|
* to the number of cases of the variant given as `denominator`.
|
|
@@ -425,22 +469,26 @@ declare abstract class PreactLitAdapterWithGridJsStyles extends PreactLitAdapter
|
|
|
425
469
|
*/
|
|
426
470
|
export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
|
|
427
471
|
/**
|
|
472
|
+
* Required.
|
|
473
|
+
*
|
|
428
474
|
* Either a single variant or an array of variants to compare.
|
|
429
475
|
* This must be a valid LAPIS filter object with an additional `displayName` property
|
|
430
476
|
* which will be used as the label for the variant in the views,
|
|
431
477
|
* or an array of such objects.
|
|
432
478
|
*/
|
|
433
|
-
numerator:
|
|
479
|
+
numerator: {
|
|
480
|
+
lapisFilter: Record<string, string | number | null | boolean>;
|
|
434
481
|
displayName: string;
|
|
435
|
-
}
|
|
482
|
+
} | {
|
|
483
|
+
lapisFilter: Record<string, string | number | null | boolean>;
|
|
436
484
|
displayName: string;
|
|
437
|
-
}
|
|
485
|
+
}[];
|
|
438
486
|
/**
|
|
487
|
+
* Required.
|
|
488
|
+
*
|
|
439
489
|
* The variant that the variants in `numerator` are compared to.
|
|
440
490
|
*/
|
|
441
|
-
denominator: Record<string, string | number | null | boolean
|
|
442
|
-
displayName: string;
|
|
443
|
-
};
|
|
491
|
+
denominator: Record<string, string | number | null | boolean>;
|
|
444
492
|
/**
|
|
445
493
|
* The granularity of the time axis.
|
|
446
494
|
*/
|
|
@@ -468,19 +516,19 @@ export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGri
|
|
|
468
516
|
/**
|
|
469
517
|
* The headline of the component. Set to an empty string to hide the headline.
|
|
470
518
|
*/
|
|
471
|
-
headline: string
|
|
519
|
+
headline: string;
|
|
472
520
|
/**
|
|
473
|
-
* The
|
|
521
|
+
* The width of the component.
|
|
474
522
|
*
|
|
475
|
-
*
|
|
523
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
524
|
+
*/
|
|
525
|
+
width: string;
|
|
526
|
+
/**
|
|
527
|
+
* The height of the component.
|
|
476
528
|
*
|
|
477
|
-
*
|
|
478
|
-
* If the unit is %, the size will be relative to the container of the component.
|
|
529
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
479
530
|
*/
|
|
480
|
-
|
|
481
|
-
width?: string;
|
|
482
|
-
height?: string;
|
|
483
|
-
} | undefined;
|
|
531
|
+
height: string;
|
|
484
532
|
render(): JSX_2.Element;
|
|
485
533
|
}
|
|
486
534
|
|
|
@@ -528,7 +576,9 @@ declare const referenceGenomeResponse: default_2.ZodObject<{
|
|
|
528
576
|
}>;
|
|
529
577
|
|
|
530
578
|
/**
|
|
531
|
-
*
|
|
579
|
+
* ## Context
|
|
580
|
+
*
|
|
581
|
+
* For this component, we assume a discrete time model, where new infections happen exactly every `generationTime` days.
|
|
532
582
|
* This is what we call a "generation".
|
|
533
583
|
*
|
|
534
584
|
* This component estimates the relative growth advantage of a variant by performing a logistic regression.
|
|
@@ -553,10 +603,14 @@ declare const referenceGenomeResponse: default_2.ZodObject<{
|
|
|
553
603
|
*/
|
|
554
604
|
export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
555
605
|
/**
|
|
606
|
+
* Required.
|
|
607
|
+
*
|
|
556
608
|
* The LAPIS filter for the focal variant.
|
|
557
609
|
*/
|
|
558
610
|
numerator: Record<string, string | number | null | boolean>;
|
|
559
611
|
/**
|
|
612
|
+
* Required.
|
|
613
|
+
*
|
|
560
614
|
* The LAPIS filter for the variant that the focal variant (`numerator`) should be compared to.
|
|
561
615
|
*/
|
|
562
616
|
denominator: Record<string, string | number | null | boolean>;
|
|
@@ -572,50 +626,27 @@ export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
|
572
626
|
/**
|
|
573
627
|
* The headline of the component. Set to an empty string to hide the headline.
|
|
574
628
|
*/
|
|
575
|
-
headline: string
|
|
629
|
+
headline: string;
|
|
576
630
|
/**
|
|
577
|
-
* The
|
|
631
|
+
* The width of the component.
|
|
578
632
|
*
|
|
579
|
-
*
|
|
633
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
634
|
+
*/
|
|
635
|
+
width: string;
|
|
636
|
+
/**
|
|
637
|
+
* The height of the component.
|
|
580
638
|
*
|
|
581
|
-
*
|
|
582
|
-
* If the unit is %, the size will be relative to the container of the component.
|
|
639
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
583
640
|
*/
|
|
584
|
-
|
|
585
|
-
width?: string;
|
|
586
|
-
height?: string;
|
|
587
|
-
} | undefined;
|
|
641
|
+
height: string;
|
|
588
642
|
render(): JSX_2.Element;
|
|
589
643
|
}
|
|
590
644
|
|
|
591
|
-
declare type SelectedFilters = {
|
|
592
|
-
nucleotideMutations: (Substitution | Deletion)[];
|
|
593
|
-
aminoAcidMutations: (Substitution | Deletion)[];
|
|
594
|
-
nucleotideInsertions: Insertion[];
|
|
595
|
-
aminoAcidInsertions: Insertion[];
|
|
596
|
-
};
|
|
597
|
-
|
|
598
|
-
declare type SelectedMutationFilterStrings = {
|
|
599
|
-
[Key in keyof SelectedFilters]: string[];
|
|
600
|
-
};
|
|
601
|
-
|
|
602
|
-
declare class Substitution implements Mutation {
|
|
603
|
-
readonly segment: string | undefined;
|
|
604
|
-
readonly valueAtReference: string | undefined;
|
|
605
|
-
readonly substitutionValue: string | undefined;
|
|
606
|
-
readonly position: number;
|
|
607
|
-
readonly code: string;
|
|
608
|
-
constructor(segment: string | undefined, valueAtReference: string | undefined, substitutionValue: string | undefined, position: number);
|
|
609
|
-
equals(other: Mutation): boolean;
|
|
610
|
-
toString(): string;
|
|
611
|
-
static parse(mutationStr: string): Substitution | null;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
645
|
/**
|
|
615
646
|
*
|
|
616
647
|
* ## Context
|
|
617
648
|
*
|
|
618
|
-
* This component provides a text input field to specify filters for arbitrary fields of this
|
|
649
|
+
* This component provides a text input field to specify filters for arbitrary fields of this LAPIS instance.
|
|
619
650
|
*
|
|
620
651
|
* @fires {CustomEvent<Record<string, string>>} gs-text-input-changed
|
|
621
652
|
* Fired when the input field is changed.
|
|
@@ -631,15 +662,24 @@ export declare class TextInputComponent extends PreactLitAdapter {
|
|
|
631
662
|
/**
|
|
632
663
|
* The initial value to use for this text input.
|
|
633
664
|
*/
|
|
634
|
-
initialValue: string
|
|
665
|
+
initialValue: string;
|
|
635
666
|
/**
|
|
636
|
-
*
|
|
667
|
+
* Required.
|
|
668
|
+
*
|
|
669
|
+
* The LAPIS field name to use for this text input.
|
|
670
|
+
* The field must exist on this LAPIS instance.
|
|
637
671
|
*/
|
|
638
672
|
lapisField: string;
|
|
639
673
|
/**
|
|
640
674
|
* The placeholder text to display in the input field.
|
|
641
675
|
*/
|
|
642
|
-
placeholderText: string
|
|
676
|
+
placeholderText: string;
|
|
677
|
+
/**
|
|
678
|
+
* The width of the component.
|
|
679
|
+
*
|
|
680
|
+
* Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
|
|
681
|
+
*/
|
|
682
|
+
width: string;
|
|
643
683
|
render(): JSX_2.Element;
|
|
644
684
|
}
|
|
645
685
|
|
|
@@ -695,10 +735,7 @@ declare global {
|
|
|
695
735
|
'gs-date-range-selector': DateRangeSelectorComponent;
|
|
696
736
|
}
|
|
697
737
|
interface HTMLElementEventMap {
|
|
698
|
-
'gs-date-range-changed': CustomEvent<
|
|
699
|
-
dateFrom: string;
|
|
700
|
-
dateTo: string;
|
|
701
|
-
}>;
|
|
738
|
+
'gs-date-range-changed': CustomEvent<Record<string, string>>;
|
|
702
739
|
}
|
|
703
740
|
}
|
|
704
741
|
|
|
@@ -725,7 +762,7 @@ declare global {
|
|
|
725
762
|
|
|
726
763
|
declare global {
|
|
727
764
|
interface HTMLElementTagNameMap {
|
|
728
|
-
'gs-mutation-filter':
|
|
765
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
729
766
|
}
|
|
730
767
|
interface HTMLElementEventMap {
|
|
731
768
|
'gs-mutation-filter-changed': CustomEvent<SelectedMutationFilterStrings>;
|