@molgenis/vip-report-template 6.2.0 → 7.0.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/.nvmrc +1 -1
- package/.travis.yml +8 -8
- package/README.md +411 -1
- package/eslint.config.mjs +11 -0
- package/package.json +40 -35
- package/scripts/deploy_npm_registry.sh +5 -0
- package/src/App.tsx +30 -24
- package/src/assets/sass/main.scss +12 -4
- package/src/components/Allele.tsx +95 -0
- package/src/components/Anchor.tsx +1 -1
- package/src/components/Breadcrumb.tsx +6 -4
- package/src/components/DatasetDropdown.tsx +12 -25
- package/src/components/ErrorNotification.tsx +9 -0
- package/src/components/GenomeBrowser.tsx +40 -23
- package/src/components/HpoTerm.tsx +1 -1
- package/src/components/{record/Pager.tsx → Pager.tsx} +21 -14
- package/src/components/RecordsPerPage.tsx +9 -7
- package/src/components/RecordsTable.tsx +130 -0
- package/src/components/SampleTable.tsx +70 -98
- package/src/components/SearchBox.tsx +8 -2
- package/src/components/Sort.tsx +28 -25
- package/src/components/Table.tsx +16 -0
- package/src/components/Tooltip.tsx +20 -0
- package/src/components/VariantBreadcrumb.tsx +54 -0
- package/src/components/VariantConsequenceContainer.tsx +100 -0
- package/src/components/VariantConsequenceTable.tsx +58 -0
- package/src/components/VariantContainer.tsx +71 -0
- package/src/components/VariantFilters.tsx +27 -0
- package/src/components/VariantGenotypeTable.tsx +44 -0
- package/src/components/VariantInfoTable.tsx +24 -33
- package/src/components/VariantResults.tsx +103 -0
- package/src/components/VariantTable.tsx +62 -66
- package/src/components/VariantTypeSelect.tsx +34 -0
- package/src/components/VariantsContainer.tsx +150 -0
- package/src/components/VariantsContainerHeader.tsx +70 -0
- package/src/components/field/Field.tsx +80 -0
- package/src/components/field/FieldAlt.tsx +19 -0
- package/src/components/field/FieldChrom.tsx +6 -0
- package/src/components/{record/Id.tsx → field/FieldFilter.tsx} +2 -1
- package/src/components/field/FieldFormat.tsx +10 -0
- package/src/components/{record/Filter.tsx → field/FieldId.tsx} +1 -1
- package/src/components/field/FieldPos.tsx +6 -0
- package/src/components/field/FieldQual.tsx +6 -0
- package/src/components/field/FieldRef.tsx +8 -0
- package/src/components/field/composed/FieldClinVar.tsx +72 -0
- package/src/components/field/composed/FieldComposed.tsx +68 -0
- package/src/components/field/composed/FieldGene.tsx +39 -0
- package/src/components/field/composed/FieldGenotype.tsx +35 -0
- package/src/components/{record/format/GenotypeField.tsx → field/composed/FieldGenotypeSnvSv.tsx} +20 -16
- package/src/components/field/composed/FieldGenotypeStr.tsx +31 -0
- package/src/components/field/composed/FieldGnomAd.tsx +58 -0
- package/src/components/field/composed/FieldHpo.tsx +50 -0
- package/src/components/field/composed/FieldInheritanceModes.tsx +32 -0
- package/src/components/field/composed/FieldLocus.tsx +18 -0
- package/src/components/field/composed/FieldVipC.tsx +25 -0
- package/src/components/field/composed/FieldVipCS.tsx +15 -0
- package/src/components/field/composed/FieldVkgl.tsx +37 -0
- package/src/components/field/genotype/FieldGenotype.tsx +19 -0
- package/src/components/field/genotype/FieldGenotypeType.tsx +9 -0
- package/src/components/field/info/FieldConsequence.tsx +15 -0
- package/src/components/{record/info/Hgvs.tsx → field/info/FieldHgvs.tsx} +4 -6
- package/src/components/field/info/FieldInfo.tsx +27 -0
- package/src/components/{record/info/PubMed.tsx → field/info/FieldPubMed.tsx} +4 -7
- package/src/components/field/typed/FieldCategorical.tsx +17 -0
- package/src/components/{record/field/FieldValueCharacter.tsx → field/typed/FieldCharacter.tsx} +3 -2
- package/src/components/{record/field/FieldValueFlag.tsx → field/typed/FieldFlag.tsx} +3 -2
- package/src/components/{record/field/FieldValueFloat.tsx → field/typed/FieldFloat.tsx} +3 -2
- package/src/components/{record/field/FieldValueInteger.tsx → field/typed/FieldInteger.tsx} +3 -2
- package/src/components/{record/field/FieldValueString.tsx → field/typed/FieldString.tsx} +3 -2
- package/src/components/field/typed/FieldTyped.tsx +20 -0
- package/src/components/field/typed/FieldTypedItem.tsx +49 -0
- package/src/components/field/typed/FieldTypedMultiple.tsx +21 -0
- package/src/components/filter/Filter.tsx +56 -48
- package/src/components/filter/FilterWrapper.scss +23 -0
- package/src/components/filter/FilterWrapper.tsx +63 -0
- package/src/components/filter/composed/FilterAllelicImbalance.tsx +26 -0
- package/src/components/filter/composed/FilterComposed.tsx +92 -0
- package/src/components/filter/composed/FilterDeNovo.tsx +35 -0
- package/src/components/filter/composed/FilterHpo.tsx +16 -0
- package/src/components/filter/composed/FilterInheritance.tsx +42 -0
- package/src/components/filter/composed/FilterLocus.tsx +75 -0
- package/src/components/filter/composed/FilterVipC.tsx +16 -0
- package/src/components/filter/composed/FilterVipCS.tsx +16 -0
- package/src/components/filter/fixed/FilterAlt.tsx +20 -0
- package/src/components/filter/fixed/FilterChrom.tsx +22 -0
- package/src/components/filter/fixed/FilterFilter.tsx +20 -0
- package/src/components/filter/fixed/FilterFixed.tsx +96 -0
- package/src/components/filter/fixed/FilterId.tsx +20 -0
- package/src/components/filter/fixed/FilterPos.tsx +22 -0
- package/src/components/filter/fixed/FilterQual.tsx +21 -0
- package/src/components/filter/fixed/FilterRef.tsx +22 -0
- package/src/components/filter/typed/FilterCategorical.tsx +119 -0
- package/src/components/filter/typed/FilterFlag.tsx +23 -0
- package/src/components/filter/typed/FilterInterval.tsx +72 -0
- package/src/components/filter/typed/FilterString.tsx +43 -0
- package/src/components/filter/typed/FilterTyped.tsx +56 -0
- package/src/components/form/ButtonApply.tsx +11 -0
- package/src/components/form/ButtonDownload.tsx +11 -0
- package/src/components/form/ButtonReset.tsx +9 -0
- package/src/components/{Checkbox.tsx → form/Checkbox.tsx} +4 -9
- package/src/components/form/Input.tsx +19 -0
- package/src/components/form/Select.scss +7 -0
- package/src/components/form/Select.tsx +34 -0
- package/src/components/tree/DecisionTreeBoolMultiQuery.tsx +1 -1
- package/src/components/tree/DecisionTreeBoolQuery.tsx +1 -1
- package/src/components/tree/DecisionTreeNode.tsx +41 -39
- package/src/components/tree/DecisionTreeNodeBool.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeBoolMulti.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeCategorical.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeExists.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeLeaf.tsx +1 -1
- package/src/components/tree/DecisionTreeOutcomeNode.tsx +1 -1
- package/src/components/tree/DecisionTreePath.tsx +1 -1
- package/src/igv.d.ts +2 -1
- package/src/index.tsx +48 -19
- package/src/mocks/GRCh37/decisionTree.json +23 -22
- package/src/mocks/GRCh37/field_metadata.json +435 -95
- package/src/mocks/GRCh37/sampleTree.json +21 -1
- package/src/mocks/GRCh37/static.ts +62 -134
- package/src/mocks/GRCh37/vcf/family.vcf.blob +9 -3
- package/src/mocks/GRCh38/decisionTree.json +52 -33
- package/src/mocks/GRCh38/decisionTreeStr.json +572 -0
- package/src/mocks/GRCh38/fasta/chr1_149380406-149403321.fasta.gz.blob +0 -0
- package/src/mocks/GRCh38/field_metadata.json +435 -95
- package/src/mocks/GRCh38/sampleTree.json +175 -0
- package/src/mocks/GRCh38/static.ts +101 -42
- package/src/mocks/GRCh38/str.cram.blob +0 -0
- package/src/mocks/GRCh38/str.cram.crai.blob +0 -0
- package/src/mocks/GRCh38/vcf/family.vcf.blob +25 -24
- package/src/mocks/GRCh38/vcf/no_vep.vcf.blob +29 -28
- package/src/mocks/GRCh38/vcf/samples_0.vcf.blob +28 -27
- package/src/mocks/GRCh38/vcf/samples_1.vcf.blob +29 -28
- package/src/mocks/GRCh38/vcf/samples_100.vcf.blob +28 -27
- package/src/mocks/GRCh38/vcf/str.vcf.blob +321 -0
- package/src/mocks/MockApiClient.ts +339 -332
- package/src/mocks/config_cram.json +701 -0
- package/src/mocks/config_vcf.json +699 -0
- package/src/store/app.ts +30 -0
- package/src/store/index.tsx +3 -168
- package/src/store/variants.ts +182 -0
- package/src/types/config.d.ts +190 -0
- package/src/types/configCellComposed.d.ts +86 -0
- package/src/types/configCells.d.ts +129 -0
- package/src/types/configFilter.d.ts +80 -0
- package/src/types/configFilterComposed.d.ts +60 -0
- package/src/types/configSort.d.ts +13 -0
- package/src/types/filter.d.ts +17 -0
- package/src/types/store.d.ts +34 -0
- package/src/utils/api.ts +281 -0
- package/src/utils/config/config.ts +182 -0
- package/src/utils/config/configCells.ts +74 -0
- package/src/utils/config/configCellsComposed.ts +508 -0
- package/src/utils/config/configCellsField.ts +61 -0
- package/src/utils/config/configCellsFixed.ts +126 -0
- package/src/utils/config/configFilters.ts +46 -0
- package/src/utils/config/configFiltersComposed.ts +208 -0
- package/src/utils/config/configFiltersField.ts +49 -0
- package/src/utils/config/configFiltersFixed.ts +106 -0
- package/src/utils/config/configSorts.ts +44 -0
- package/src/utils/config/configValidator.ts +380 -0
- package/src/utils/config/configVip.ts +25 -0
- package/src/utils/csq.ts +115 -0
- package/src/utils/decisionTree.ts +45 -0
- package/src/utils/download.ts +30 -0
- package/src/utils/error.ts +69 -0
- package/src/utils/query/query.ts +55 -0
- package/src/utils/query/queryFilter.ts +132 -0
- package/src/utils/query/queryFilterComposed.ts +247 -0
- package/src/utils/query/queryFilterField.ts +75 -0
- package/src/utils/query/queryFilterFixed.ts +44 -0
- package/src/utils/query/querySample.ts +18 -0
- package/src/utils/query/queryVariantType.ts +76 -0
- package/src/utils/query/selector.ts +41 -0
- package/src/utils/{sortUtils.ts → query/sort.ts} +32 -11
- package/src/utils/sample.ts +19 -35
- package/src/utils/utils.ts +66 -2
- package/src/utils/variantType.ts +43 -0
- package/src/utils/vcf.ts +352 -0
- package/src/views/Help.tsx +109 -114
- package/src/views/Home.tsx +3 -2
- package/src/views/Sample.tsx +12 -7
- package/src/views/SampleVariant.tsx +23 -112
- package/src/views/SampleVariantConsequence.tsx +54 -144
- package/src/views/SampleVariants.tsx +33 -445
- package/src/views/SampleVariantsRedirect.tsx +20 -0
- package/src/views/Samples.tsx +7 -10
- package/src/views/Variant.tsx +31 -61
- package/src/views/VariantConsequence.tsx +42 -72
- package/src/views/Variants.tsx +29 -138
- package/src/views/VariantsRedirect.tsx +25 -0
- package/src/views/data/data.tsx +32 -6
- package/tests/store/variants.test.ts +122 -0
- package/tests/utils/config/config.test.ts +167 -0
- package/tests/utils/config/configCells.test.ts +86 -0
- package/tests/utils/config/configCellsComposed.test.ts +1163 -0
- package/tests/utils/config/configCellsField.test.ts +164 -0
- package/tests/utils/config/configCellsFixed.test.ts +99 -0
- package/tests/utils/config/configFilters.test.ts +80 -0
- package/tests/utils/config/configFiltersComposed.test.ts +504 -0
- package/tests/utils/config/configFiltersField.test.ts +140 -0
- package/tests/utils/config/configFiltersFixed.test.ts +81 -0
- package/tests/utils/config/configSorts.test.ts +55 -0
- package/tests/utils/config/configValidator.test.ts +56 -0
- package/tests/utils/config/configVip.test.ts +53 -0
- package/tests/utils/decisionTree.test.ts +71 -0
- package/tests/utils/download.test.ts +20 -0
- package/tests/utils/query/query.test.ts +84 -0
- package/tests/utils/query/queryFilter.test.ts +243 -0
- package/tests/utils/query/queryFilterComposed.test.ts +301 -0
- package/tests/utils/query/queryFilterField.test.ts +75 -0
- package/tests/utils/query/queryFilterFixed.test.ts +86 -0
- package/tests/utils/query/querySample.test.ts +45 -0
- package/tests/utils/query/queryVariantType.test.ts +56 -0
- package/{src/__tests__/sortUtils.test.ts → tests/utils/query/sort.test.ts} +3 -4
- package/tests/utils/sample.test.ts +259 -0
- package/tests/utils/utils.test.ts +120 -0
- package/tests/utils/variantType.test.ts +48 -0
- package/tests/utils/vcf.test.ts +649 -0
- package/tsconfig.json +6 -2
- package/vite.config.mts +20 -3
- package/.eslintignore +0 -4
- package/.eslintrc.js +0 -23
- package/src/Api.ts +0 -12
- package/src/__tests__/decisionTreeUtils.test.ts +0 -75
- package/src/__tests__/field.test.ts +0 -107
- package/src/__tests__/query.test.ts +0 -188
- package/src/__tests__/sample.test.ts +0 -184
- package/src/__tests__/utils.test.ts +0 -24
- package/src/__tests__/viewUtils.test.ts +0 -125
- package/src/components/ConsequenceTable.tsx +0 -45
- package/src/components/Error.tsx +0 -9
- package/src/components/FieldHeader.tsx +0 -26
- package/src/components/InfoCollapsablePane.tsx +0 -90
- package/src/components/VariantInfoNestedTable.tsx +0 -127
- package/src/components/VariantSampleTable.tsx +0 -58
- package/src/components/VariantsSampleTable.tsx +0 -184
- package/src/components/VariantsTable.tsx +0 -125
- package/src/components/filter/FilterAllelicBalance.tsx +0 -81
- package/src/components/filter/FilterCategorical.tsx +0 -81
- package/src/components/filter/FilterClinVar.tsx +0 -21
- package/src/components/filter/FilterGene.tsx +0 -34
- package/src/components/filter/FilterHpo.tsx +0 -161
- package/src/components/filter/FilterInheritance.tsx +0 -162
- package/src/components/filter/FilterIntegerGq.tsx +0 -47
- package/src/components/filter/FilterVI.tsx +0 -68
- package/src/components/filter/FilterVariantType.tsx +0 -146
- package/src/components/filter/Filters.tsx +0 -29
- package/src/components/filter/InfoFilter.tsx +0 -39
- package/src/components/filter/InfoFilters.tsx +0 -35
- package/src/components/filter/SampleFilters.tsx +0 -93
- package/src/components/filter/SamplesFilters.tsx +0 -33
- package/src/components/record/Allele.tsx +0 -38
- package/src/components/record/AlleleBreakend.tsx +0 -5
- package/src/components/record/AlleleMissing.tsx +0 -5
- package/src/components/record/AlleleNucs.tsx +0 -49
- package/src/components/record/AlleleSymbolic.tsx +0 -5
- package/src/components/record/Alt.tsx +0 -17
- package/src/components/record/Chrom.tsx +0 -5
- package/src/components/record/Format.tsx +0 -40
- package/src/components/record/Info.tsx +0 -55
- package/src/components/record/Pos.tsx +0 -5
- package/src/components/record/Qual.tsx +0 -5
- package/src/components/record/RecordDownload.tsx +0 -66
- package/src/components/record/Ref.tsx +0 -6
- package/src/components/record/field/Field.tsx +0 -36
- package/src/components/record/field/FieldMultipleValue.tsx +0 -22
- package/src/components/record/field/FieldSingleValue.tsx +0 -35
- package/src/components/record/info/ClinVar.tsx +0 -81
- package/src/components/record/info/Consequence.tsx +0 -18
- package/src/components/record/info/Gene.tsx +0 -56
- package/src/components/record/info/GnomAD.tsx +0 -54
- package/src/components/record/info/Hpo.tsx +0 -52
- package/src/components/record/info/InheritanceModes.tsx +0 -22
- package/src/components/record/info/VipC.tsx +0 -23
- package/src/components/record/info/Vkgl.tsx +0 -42
- package/src/mocks/GRCh37/vcf/no_vep.vcf.blob +0 -61
- package/src/mocks/GRCh37/vcf/samples_0.vcf.blob +0 -93
- package/src/mocks/GRCh37/vcf/samples_1.vcf.blob +0 -93
- package/src/mocks/GRCh37/vcf/samples_100.vcf.blob +0 -93
- package/src/utils/ApiUtils.ts +0 -263
- package/src/utils/csqUtils.ts +0 -27
- package/src/utils/decisionTreeUtils.ts +0 -31
- package/src/utils/field.ts +0 -49
- package/src/utils/query.ts +0 -154
- package/src/utils/viewUtils.ts +0 -32
package/src/store/app.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createStore, produce } from "solid-js/store";
|
|
2
|
+
import { AppActions, AppState, AppStore } from "../types/store";
|
|
3
|
+
|
|
4
|
+
const defaultState: AppState = { variants: {}, sampleVariants: {}, samples: {} };
|
|
5
|
+
|
|
6
|
+
export function createAppStore(): AppStore {
|
|
7
|
+
const [state, setState] = createStore(defaultState);
|
|
8
|
+
|
|
9
|
+
const actions: AppActions = {
|
|
10
|
+
reset() {
|
|
11
|
+
setState(
|
|
12
|
+
produce((state) => {
|
|
13
|
+
state.variants = {};
|
|
14
|
+
state.sampleVariants = {};
|
|
15
|
+
state.samples = {};
|
|
16
|
+
}),
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
setSamplePage(page: number) {
|
|
20
|
+
setState({ samples: { ...(state.samples || {}), page } });
|
|
21
|
+
},
|
|
22
|
+
setSampleSearchQuery(searchQuery: string) {
|
|
23
|
+
setState({ samples: { ...(state.samples || {}), searchQuery, page: undefined } });
|
|
24
|
+
},
|
|
25
|
+
setSampleProbandFilterValue(probandFilterValue: boolean) {
|
|
26
|
+
setState({ samples: { ...(state.samples || {}), probandFilterValue, page: undefined } });
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
return [state, actions, setState];
|
|
30
|
+
}
|
package/src/store/index.tsx
CHANGED
|
@@ -1,176 +1,11 @@
|
|
|
1
1
|
import { Context, createContext, ParentComponent, useContext } from "solid-js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export type FilterQueries = { [key: string]: Query | undefined };
|
|
6
|
-
|
|
7
|
-
type AppStateVariants = {
|
|
8
|
-
page?: number;
|
|
9
|
-
pageSize?: number;
|
|
10
|
-
searchQuery?: string;
|
|
11
|
-
filterQueries?: FilterQueries;
|
|
12
|
-
sort?: SortOrder | null; // null: do not sort. undefined: sort undefined
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type AppStateSamples = {
|
|
16
|
-
page?: number;
|
|
17
|
-
searchQuery?: string;
|
|
18
|
-
probandFilterValue?: boolean;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export type AppState = {
|
|
22
|
-
variants?: AppStateVariants;
|
|
23
|
-
sampleVariants?: {
|
|
24
|
-
[key: number]: { variants: AppStateVariants };
|
|
25
|
-
};
|
|
26
|
-
samples?: AppStateSamples;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type AppActions = {
|
|
30
|
-
reset(): void;
|
|
31
|
-
setVariantsPage(page: number): void;
|
|
32
|
-
setVariantsPageSize(pageSize: number): void;
|
|
33
|
-
setVariantsSearchQuery(searchQuery: string): void;
|
|
34
|
-
setVariantsFilterQuery(query: Query, key: string): void;
|
|
35
|
-
clearVariantsFilterQuery(key: string): void;
|
|
36
|
-
setVariantsSort(sort: SortOrder | null): void;
|
|
37
|
-
setSampleVariantsPage(sample: Item<Sample>, page: number): void;
|
|
38
|
-
setSampleVariantsPageSize(sample: Item<Sample>, pageSize: number): void;
|
|
39
|
-
setSampleVariantsSearchQuery(sample: Item<Sample>, searchQuery: string): void;
|
|
40
|
-
setSampleVariantsFilterQuery(sample: Item<Sample>, query: Query, key: string): void;
|
|
41
|
-
clearSampleVariantsFilterQuery(sample: Item<Sample>, key: string): void;
|
|
42
|
-
setSampleVariantsSort(sample: Item<Sample>, sort: SortOrder | null): void;
|
|
43
|
-
setSamplePage(page: number): void;
|
|
44
|
-
setSampleSearchQuery(searchQuery: string): void;
|
|
45
|
-
setSampleProbandFilterValue(probandFilterValue: boolean): void;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type AppStore = [state: AppState, actions: AppActions];
|
|
49
|
-
|
|
50
|
-
const defaultState: AppState = { variants: {}, sampleVariants: {} };
|
|
2
|
+
import { AppStore } from "../types/store";
|
|
3
|
+
import { createAppStore } from "./app.ts";
|
|
51
4
|
|
|
52
5
|
const StoreContext = createContext<AppStore>() as Context<AppStore>;
|
|
53
6
|
|
|
54
7
|
export const Provider: ParentComponent = (props) => {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
function getVariants(sample: Item<Sample>) {
|
|
58
|
-
return state.sampleVariants ? state.sampleVariants[sample.id]?.variants || {} : {};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const actions: AppActions = {
|
|
62
|
-
reset() {
|
|
63
|
-
setState({ variants: undefined, sampleVariants: undefined, samples: undefined });
|
|
64
|
-
},
|
|
65
|
-
setVariantsPage(page: number) {
|
|
66
|
-
setState({ variants: { ...(state.variants || {}), page } });
|
|
67
|
-
},
|
|
68
|
-
setVariantsPageSize(pageSize: number) {
|
|
69
|
-
setState({ variants: { ...(state.variants || {}), pageSize, page: undefined } });
|
|
70
|
-
},
|
|
71
|
-
setVariantsSearchQuery(searchQuery: string) {
|
|
72
|
-
setState({ variants: { ...(state.variants || {}), searchQuery, page: undefined } });
|
|
73
|
-
},
|
|
74
|
-
setVariantsFilterQuery(query: Query, key: string) {
|
|
75
|
-
setState({
|
|
76
|
-
variants: {
|
|
77
|
-
...(state.variants || {}),
|
|
78
|
-
filterQueries: { ...(state.variants?.filterQueries || {}), [key]: query },
|
|
79
|
-
page: undefined,
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
clearVariantsFilterQuery(key: string) {
|
|
84
|
-
setState({
|
|
85
|
-
variants: {
|
|
86
|
-
...(state.variants || {}),
|
|
87
|
-
filterQueries: { ...(state.variants?.filterQueries || {}), [key]: undefined },
|
|
88
|
-
page: undefined,
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
setVariantsSort(sort: SortOrder | null) {
|
|
93
|
-
setState({
|
|
94
|
-
variants: {
|
|
95
|
-
...(state.variants || {}),
|
|
96
|
-
sort,
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
},
|
|
100
|
-
setSampleVariantsPage(sample: Item<Sample>, page: number) {
|
|
101
|
-
setState({
|
|
102
|
-
sampleVariants: {
|
|
103
|
-
...(state.sampleVariants || {}),
|
|
104
|
-
[sample.id]: { variants: { ...getVariants(sample), page } },
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
},
|
|
108
|
-
setSampleVariantsPageSize(sample: Item<Sample>, pageSize: number) {
|
|
109
|
-
setState({
|
|
110
|
-
sampleVariants: {
|
|
111
|
-
...(state.sampleVariants || {}),
|
|
112
|
-
[sample.id]: { variants: { ...getVariants(sample), pageSize, page: undefined } },
|
|
113
|
-
},
|
|
114
|
-
});
|
|
115
|
-
},
|
|
116
|
-
setSampleVariantsSearchQuery(sample: Item<Sample>, searchQuery: string) {
|
|
117
|
-
setState({
|
|
118
|
-
sampleVariants: {
|
|
119
|
-
...(state.sampleVariants || {}),
|
|
120
|
-
[sample.id]: { variants: { ...getVariants(sample), searchQuery, page: undefined } },
|
|
121
|
-
},
|
|
122
|
-
});
|
|
123
|
-
},
|
|
124
|
-
setSampleVariantsFilterQuery(sample: Item<Sample>, query: Query, key: string) {
|
|
125
|
-
const variants = getVariants(sample);
|
|
126
|
-
setState({
|
|
127
|
-
sampleVariants: {
|
|
128
|
-
...(state.sampleVariants || {}),
|
|
129
|
-
[sample.id]: {
|
|
130
|
-
variants: {
|
|
131
|
-
...variants,
|
|
132
|
-
filterQueries: { ...(variants.filterQueries || {}), [key]: query },
|
|
133
|
-
page: undefined,
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
clearSampleVariantsFilterQuery(sample: Item<Sample>, key: string) {
|
|
140
|
-
const variants = getVariants(sample);
|
|
141
|
-
setState({
|
|
142
|
-
sampleVariants: {
|
|
143
|
-
...(state.sampleVariants || {}),
|
|
144
|
-
[sample.id]: {
|
|
145
|
-
variants: {
|
|
146
|
-
...getVariants(sample),
|
|
147
|
-
filterQueries: { ...(variants.filterQueries || {}), [key]: undefined },
|
|
148
|
-
page: undefined,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
setSampleVariantsSort(sample: Item<Sample>, sort: SortOrder | null) {
|
|
155
|
-
setState({
|
|
156
|
-
sampleVariants: {
|
|
157
|
-
...(state.sampleVariants || {}),
|
|
158
|
-
[sample.id]: { variants: { ...getVariants(sample), sort } },
|
|
159
|
-
},
|
|
160
|
-
});
|
|
161
|
-
},
|
|
162
|
-
setSamplePage(page: number) {
|
|
163
|
-
setState({ samples: { ...(state.samples || {}), page } });
|
|
164
|
-
},
|
|
165
|
-
setSampleSearchQuery(searchQuery: string) {
|
|
166
|
-
setState({ samples: { ...(state.samples || {}), searchQuery, page: undefined } });
|
|
167
|
-
},
|
|
168
|
-
setSampleProbandFilterValue(probandFilterValue: boolean) {
|
|
169
|
-
setState({ samples: { ...(state.samples || {}), probandFilterValue, page: undefined } });
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
const store: AppStore = [state, actions];
|
|
173
|
-
|
|
8
|
+
const store = createAppStore();
|
|
174
9
|
return <StoreContext.Provider value={store}>{props.children}</StoreContext.Provider>;
|
|
175
10
|
};
|
|
176
11
|
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { VariantType } from "../utils/variantType.ts";
|
|
2
|
+
import { SampleContainer } from "../utils/api.ts";
|
|
3
|
+
import { FilterValueMap } from "../types/filter";
|
|
4
|
+
import { FilterId, FilterValue } from "../types/configFilter";
|
|
5
|
+
import { produce } from "solid-js/store";
|
|
6
|
+
import { AppState, AppStateVariantType, AppStateVariantTypes, AppStore, Page, Sort } from "../types/store";
|
|
7
|
+
|
|
8
|
+
export type VariantStore = {
|
|
9
|
+
getFilterValues(): FilterValueMap;
|
|
10
|
+
setFilterValue(id: FilterId, value: FilterValue): void;
|
|
11
|
+
clearFilter(id: FilterId): void;
|
|
12
|
+
getPageNumber(): number | null;
|
|
13
|
+
setPageNumber(pageNumber: number): void;
|
|
14
|
+
getPageSize(): number | null;
|
|
15
|
+
setPageSize(pageSize: number): void;
|
|
16
|
+
/**
|
|
17
|
+
* null: do not sort, the caller of this function should not fall back to a default sort
|
|
18
|
+
* undefined: sort behavior is undefined, the caller of this function could fall back to a default sort
|
|
19
|
+
*/
|
|
20
|
+
getSort(): Sort | null | undefined;
|
|
21
|
+
setSort(sort: Sort): void;
|
|
22
|
+
clearSort(): void;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function wrapStore(store: AppStore, sample: SampleContainer | null, variantType: VariantType) {
|
|
26
|
+
const [state, , setState] = store;
|
|
27
|
+
|
|
28
|
+
function getVariantsState(state: AppState): AppStateVariantType {
|
|
29
|
+
let stateVariantTypes: AppStateVariantTypes;
|
|
30
|
+
|
|
31
|
+
if (sample !== null) {
|
|
32
|
+
const sampleVariantsState = state.sampleVariants;
|
|
33
|
+
|
|
34
|
+
// get sample
|
|
35
|
+
const sampleKey = sample.item.id.toString();
|
|
36
|
+
if (sampleKey in sampleVariantsState) {
|
|
37
|
+
stateVariantTypes = sampleVariantsState[sampleKey]!;
|
|
38
|
+
} else {
|
|
39
|
+
stateVariantTypes = {};
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
stateVariantTypes = state.variants;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// get variant type
|
|
46
|
+
let stateVariantType: AppStateVariantType;
|
|
47
|
+
const variantTypeKey = variantType.id;
|
|
48
|
+
if (variantTypeKey in stateVariantTypes) {
|
|
49
|
+
stateVariantType = stateVariantTypes[variantTypeKey]!;
|
|
50
|
+
} else {
|
|
51
|
+
stateVariantType = {};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return stateVariantType;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function getCreateVariantsState(state: AppState): AppStateVariantType {
|
|
58
|
+
let stateVariantTypes: AppStateVariantTypes;
|
|
59
|
+
|
|
60
|
+
if (sample !== null) {
|
|
61
|
+
const sampleVariantsState = state.sampleVariants;
|
|
62
|
+
|
|
63
|
+
// get/create sample
|
|
64
|
+
const sampleKey = sample.item.id.toString();
|
|
65
|
+
if (sampleKey in sampleVariantsState) {
|
|
66
|
+
stateVariantTypes = sampleVariantsState[sampleKey]!;
|
|
67
|
+
} else {
|
|
68
|
+
stateVariantTypes = {};
|
|
69
|
+
sampleVariantsState[sampleKey] = stateVariantTypes;
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
stateVariantTypes = state.variants;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// get/create variant type
|
|
76
|
+
let stateVariantType: AppStateVariantType;
|
|
77
|
+
const variantTypeKey = variantType.id;
|
|
78
|
+
if (variantTypeKey in stateVariantTypes) {
|
|
79
|
+
stateVariantType = stateVariantTypes[variantTypeKey]!;
|
|
80
|
+
} else {
|
|
81
|
+
stateVariantType = {};
|
|
82
|
+
stateVariantTypes[variantTypeKey] = stateVariantType;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return stateVariantType;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function getCreateVariantsStatePage(state: AppState): Page {
|
|
89
|
+
const stateVariantType: AppStateVariantType = getCreateVariantsState(state);
|
|
90
|
+
let page = stateVariantType.page;
|
|
91
|
+
if (page === undefined) {
|
|
92
|
+
page = { number: 0 };
|
|
93
|
+
stateVariantType.page = page;
|
|
94
|
+
}
|
|
95
|
+
return page;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getCreateVariantsStateFilterValues(state: AppState): FilterValueMap {
|
|
99
|
+
const stateVariantType: AppStateVariantType = getCreateVariantsState(state);
|
|
100
|
+
let filterValues = stateVariantType.filterValues;
|
|
101
|
+
if (filterValues === undefined) {
|
|
102
|
+
filterValues = {};
|
|
103
|
+
stateVariantType.filterValues = filterValues;
|
|
104
|
+
}
|
|
105
|
+
return filterValues;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
getFilterValues(): FilterValueMap {
|
|
110
|
+
return getVariantsState(state).filterValues || {};
|
|
111
|
+
},
|
|
112
|
+
setFilterValue(id: FilterId, value: FilterValue) {
|
|
113
|
+
setState(
|
|
114
|
+
produce((state) => {
|
|
115
|
+
const filterValueMap = getCreateVariantsStateFilterValues(state);
|
|
116
|
+
filterValueMap[id] = value;
|
|
117
|
+
|
|
118
|
+
const page = getCreateVariantsStatePage(state);
|
|
119
|
+
page.number = 0;
|
|
120
|
+
}),
|
|
121
|
+
);
|
|
122
|
+
console.log("state change", JSON.stringify(state));
|
|
123
|
+
},
|
|
124
|
+
clearFilter(id: FilterId) {
|
|
125
|
+
setState(
|
|
126
|
+
produce((state) => {
|
|
127
|
+
const filterValueMap = getCreateVariantsStateFilterValues(state);
|
|
128
|
+
delete filterValueMap[id];
|
|
129
|
+
|
|
130
|
+
const page = getCreateVariantsStatePage(state);
|
|
131
|
+
page.number = 0;
|
|
132
|
+
}),
|
|
133
|
+
);
|
|
134
|
+
},
|
|
135
|
+
getPageNumber(): number | null {
|
|
136
|
+
const page = getVariantsState(state).page;
|
|
137
|
+
return page ? page.number : null;
|
|
138
|
+
},
|
|
139
|
+
setPageNumber(pageNumber: number) {
|
|
140
|
+
setState(
|
|
141
|
+
produce((state) => {
|
|
142
|
+
const page = getCreateVariantsStatePage(state);
|
|
143
|
+
page.number = pageNumber;
|
|
144
|
+
}),
|
|
145
|
+
);
|
|
146
|
+
console.log("state change", JSON.stringify(state));
|
|
147
|
+
},
|
|
148
|
+
getPageSize(): number | null {
|
|
149
|
+
const page = getVariantsState(state).page;
|
|
150
|
+
return page ? (page.size !== undefined ? page.size : null) : null;
|
|
151
|
+
},
|
|
152
|
+
setPageSize(pageSize: number) {
|
|
153
|
+
setState(
|
|
154
|
+
produce((state) => {
|
|
155
|
+
const variantsState = getCreateVariantsState(state);
|
|
156
|
+
variantsState.page = { number: 0, size: pageSize };
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
console.log("state change", JSON.stringify(state));
|
|
160
|
+
},
|
|
161
|
+
getSort(): Sort | null | undefined {
|
|
162
|
+
return getVariantsState(state).sort;
|
|
163
|
+
},
|
|
164
|
+
setSort(sort: Sort) {
|
|
165
|
+
setState(
|
|
166
|
+
produce((state) => {
|
|
167
|
+
const variantsState = getCreateVariantsState(state);
|
|
168
|
+
variantsState.sort = sort;
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
console.log("state change", JSON.stringify(state));
|
|
172
|
+
},
|
|
173
|
+
clearSort() {
|
|
174
|
+
setState(
|
|
175
|
+
produce((state) => {
|
|
176
|
+
const variantsState = getCreateVariantsState(state);
|
|
177
|
+
variantsState.sort = null;
|
|
178
|
+
}),
|
|
179
|
+
);
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { ConfigFilter } from "./configFilter";
|
|
2
|
+
import { ConfigCell } from "./configCells";
|
|
3
|
+
import { ConfigSort } from "./configSort";
|
|
4
|
+
import { FieldMetadataWrapper } from "../utils/vcf.ts";
|
|
5
|
+
|
|
6
|
+
export interface Describable {
|
|
7
|
+
// overwrites existing label
|
|
8
|
+
label?: string;
|
|
9
|
+
// overwrites existing description
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ConfigJsonFieldFixed extends Describable {
|
|
14
|
+
type: "fixed";
|
|
15
|
+
name: "chrom" | "pos" | "id" | "ref" | "alt" | "qual" | "filter";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ConfigJsonFieldInfo extends Describable {
|
|
19
|
+
type: "info";
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ConfigJsonFieldFormat extends Describable {
|
|
24
|
+
type: "format";
|
|
25
|
+
name: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ConfigJsonFieldGenotype extends Describable {
|
|
29
|
+
type: "genotype";
|
|
30
|
+
name: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ConfigJsonFieldComposed extends Describable {
|
|
34
|
+
type: "composed";
|
|
35
|
+
name:
|
|
36
|
+
| "clinVar"
|
|
37
|
+
| "gene"
|
|
38
|
+
| "genotype"
|
|
39
|
+
| "genotype_maternal"
|
|
40
|
+
| "genotype_paternal"
|
|
41
|
+
| "gnomAdAf"
|
|
42
|
+
| "hpo"
|
|
43
|
+
| "inheritancePattern"
|
|
44
|
+
| "locus"
|
|
45
|
+
| "ref"
|
|
46
|
+
| "vipC"
|
|
47
|
+
| "vipCS"
|
|
48
|
+
| "vkgl";
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ConfigJsonSort {
|
|
52
|
+
selected: boolean;
|
|
53
|
+
orders: ConfigJsonSortOrder[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ConfigJsonSortOrder {
|
|
57
|
+
direction: "desc" | "asc";
|
|
58
|
+
field: ConfigJsonFieldItem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface ConfigJsonRecordsPerPageOption {
|
|
62
|
+
selected?: boolean;
|
|
63
|
+
number: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type ConfigJsonFieldItem =
|
|
67
|
+
| ConfigJsonFieldFixed
|
|
68
|
+
| ConfigJsonFieldInfo
|
|
69
|
+
| ConfigJsonFieldFormat
|
|
70
|
+
| ConfigJsonFieldGenotype
|
|
71
|
+
| ConfigJsonFieldComposed;
|
|
72
|
+
|
|
73
|
+
export type ConfigJsonFieldItemGroup = { type: "group"; fields: ConfigJsonFieldItem[] };
|
|
74
|
+
export type ConfigJsonField = ConfigJsonFieldItem | ConfigJsonFieldItemGroup;
|
|
75
|
+
|
|
76
|
+
export interface ConfigJsonFilterFixed extends Describable {
|
|
77
|
+
type: "fixed";
|
|
78
|
+
name: "chrom" | "pos" | "id" | "ref" | "alt" | "qual" | "filter";
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface ConfigJsonFilterInfo extends Describable {
|
|
82
|
+
type: "info";
|
|
83
|
+
name: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ConfigJsonFilterFormat extends Describable {
|
|
87
|
+
type: "format";
|
|
88
|
+
name: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface ConfigJsonFilterGenotype extends Describable {
|
|
92
|
+
type: "genotype";
|
|
93
|
+
name: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface ConfigJsonFilterComposed extends Describable {
|
|
97
|
+
type: "composed";
|
|
98
|
+
name: "allelicImbalance" | "deNovo" | "hpo" | "inheritanceMatch" | "locus" | "vipC" | "vipCS";
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type ConfigJsonFilter =
|
|
102
|
+
| ConfigJsonFilterFixed
|
|
103
|
+
| ConfigJsonFilterInfo
|
|
104
|
+
| ConfigJsonFilterFormat
|
|
105
|
+
| ConfigJsonFilterGenotype
|
|
106
|
+
| ConfigJsonFilterComposed;
|
|
107
|
+
|
|
108
|
+
export type ConfigJsonVariantType = "all" | "str" | "snv" | "sv";
|
|
109
|
+
export type ConfigJsonVariantTypeFields = { [key in ConfigJsonVariantType]?: ConfigJsonField[] };
|
|
110
|
+
export type ConfigJsonVariantTypeFilters = { [key in ConfigJsonVariantType]?: ConfigJsonFilter[] };
|
|
111
|
+
export type ConfigJsonSorts = { [key in ConfigJsonVariantType]?: ConfigJsonSort[] };
|
|
112
|
+
export type ConfigJsonRecordsPerPage = { [key in ConfigJsonVariantType]?: ConfigJsonRecordsPerPageOption[] };
|
|
113
|
+
|
|
114
|
+
export type ConfigJsonVipParamsCram = { call_snv: boolean; call_str: boolean; call_sv: boolean; call_cnv: boolean };
|
|
115
|
+
|
|
116
|
+
export type ConfigJsonVipParamsVcf = {
|
|
117
|
+
filter: { classes: string; consequences: boolean };
|
|
118
|
+
filter_samples: { classes: string };
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type ConfigJsonVipParams = {
|
|
122
|
+
cram?: ConfigJsonVipParamsCram;
|
|
123
|
+
vcf: ConfigJsonVipParamsVcf;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export type ConfigJsonVip = {
|
|
127
|
+
filter_field: ConfigJsonFieldGenotype;
|
|
128
|
+
params: ConfigJsonVipParams;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export type ConfigJsonVariants = {
|
|
132
|
+
cells: ConfigJsonVariantTypeFields;
|
|
133
|
+
filters?: ConfigJsonVariantTypeFilters;
|
|
134
|
+
sorts?: ConfigJsonSorts;
|
|
135
|
+
recordsPerPage?: ConfigJsonRecordsPerPage;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export type ConfigJsonVariant = {
|
|
139
|
+
cells: ConfigJsonVariantTypeFields;
|
|
140
|
+
sample_cells?: ConfigJsonVariantTypeFields;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export type ConfigJsonVariantConsequence = {
|
|
144
|
+
sample_cells?: ConfigJsonVariantTypeFields;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export type ConfigJson = {
|
|
148
|
+
vip: ConfigJsonVip;
|
|
149
|
+
sample_variants: ConfigJsonVariants;
|
|
150
|
+
variants: ConfigJsonVariants;
|
|
151
|
+
sample_variant: ConfigJsonVariant;
|
|
152
|
+
variant: ConfigJsonVariant;
|
|
153
|
+
sample_variant_consequence: ConfigJsonVariantConsequence;
|
|
154
|
+
variant_consequence: ConfigJsonVariantConsequence;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type Config = {
|
|
158
|
+
vip: ConfigVip;
|
|
159
|
+
variants: ConfigVariants;
|
|
160
|
+
variant: ConfigVariant;
|
|
161
|
+
variantConsequence: ConfigVariantConsequence;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export type ConfigFilters = ConfigFilter[];
|
|
165
|
+
export type ConfigCells = ConfigCell[];
|
|
166
|
+
export type ConfigSorts = ConfigSort[];
|
|
167
|
+
export type ConfigRecordsPerPageOption = ConfigJsonRecordsPerPageOption;
|
|
168
|
+
export type ConfigRecordsPerPage = ConfigRecordsPerPageOption[];
|
|
169
|
+
|
|
170
|
+
export type ConfigVariants = {
|
|
171
|
+
cells: ConfigCells;
|
|
172
|
+
filters: ConfigFilters;
|
|
173
|
+
sorts: ConfigSorts;
|
|
174
|
+
recordsPerPage: ConfigRecordsPerPage;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export type ConfigSamplesCells = { [key: string]: ConfigCells };
|
|
178
|
+
export type ConfigVariant = {
|
|
179
|
+
cells: ConfigCells;
|
|
180
|
+
samplesCells?: ConfigSamplesCells;
|
|
181
|
+
};
|
|
182
|
+
export type ConfigVariantConsequence = {
|
|
183
|
+
samplesCells?: ConfigSamplesCells;
|
|
184
|
+
};
|
|
185
|
+
export type ConfigVipParams = ConfigJsonVipParams;
|
|
186
|
+
|
|
187
|
+
export type ConfigVip = {
|
|
188
|
+
filter_field: FieldMetadataWrapper;
|
|
189
|
+
params: ConfigVipParams;
|
|
190
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Genotype, InfoMetadata, ValueFlag, ValueFloat, ValueString } from "@molgenis/vip-report-vcf";
|
|
2
|
+
import { ValueCategorical } from "../utils/vcf.ts";
|
|
3
|
+
|
|
4
|
+
export type CellValueClinVar = {
|
|
5
|
+
clnSigs: ValueCategorical[];
|
|
6
|
+
clnIds: number[] | undefined;
|
|
7
|
+
clnRevStats: ValueCategorical[] | undefined;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type CellValueGene = {
|
|
11
|
+
geneIdentifier: ValueString | undefined;
|
|
12
|
+
incompletePenetrance: ValueCategorical | undefined;
|
|
13
|
+
symbol: ValueString;
|
|
14
|
+
symbolSource: ValueString | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type CellValueGnomAd = {
|
|
18
|
+
c: string;
|
|
19
|
+
p: number;
|
|
20
|
+
r: string;
|
|
21
|
+
a: (string | null)[];
|
|
22
|
+
gnomAdAf: ValueFloat;
|
|
23
|
+
gnomAdCov: ValueFloat | undefined;
|
|
24
|
+
gnomAdQcs: string[] | undefined;
|
|
25
|
+
alleleNum: number | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type CellValueGenotype = {
|
|
29
|
+
refAllele: string;
|
|
30
|
+
altAlleles: (string | null)[];
|
|
31
|
+
genotype: Genotype;
|
|
32
|
+
svType: ValueString | undefined;
|
|
33
|
+
repeatCount: ValueString | undefined;
|
|
34
|
+
repeatUnitValue: ValueString | undefined;
|
|
35
|
+
repeatUnitMatch: ValueFlag | undefined;
|
|
36
|
+
displayRepeatUnit: ValueString | undefined;
|
|
37
|
+
viab: number | null | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type CellValueHpo = {
|
|
41
|
+
hpos: ValueCategorical[];
|
|
42
|
+
gadoPd: ValueCategorical | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type CellValueInheritanceModes = {
|
|
46
|
+
fieldInheritanceModesGene: InfoMetadata;
|
|
47
|
+
inheritanceModesGene: ValueCategorical[];
|
|
48
|
+
isPossibleCompound: ValueFlag | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type CellValueLocus = { c: string; p: number; href: string };
|
|
52
|
+
|
|
53
|
+
export type CellValueVipC = {
|
|
54
|
+
href: string;
|
|
55
|
+
vipC: ValueCategorical;
|
|
56
|
+
vipP: string[] | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type CellValueVipCS = {
|
|
60
|
+
vipCS: ValueCategorical;
|
|
61
|
+
vipPS: string[] | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type CellValueVkgl = {
|
|
65
|
+
vkglCl: ValueCategorical;
|
|
66
|
+
vkglAmc: ValueCategorical | undefined;
|
|
67
|
+
vkglErasmus: ValueCategorical | undefined;
|
|
68
|
+
vkglLumc: ValueCategorical | undefined;
|
|
69
|
+
vkglNki: ValueCategorical | undefined;
|
|
70
|
+
vkglRadboudMumc: ValueCategorical | undefined;
|
|
71
|
+
vkglUmcg: ValueCategorical | undefined;
|
|
72
|
+
vkglUmcu: ValueCategorical | undefined;
|
|
73
|
+
vkglVumc: ValueCategorical | undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type CellValueCustom =
|
|
77
|
+
| CellValueClinVar
|
|
78
|
+
| CellValueGene
|
|
79
|
+
| CellValueGnomAd
|
|
80
|
+
| CellValueGenotype
|
|
81
|
+
| CellValueHpo
|
|
82
|
+
| CellValueInheritanceModes
|
|
83
|
+
| CellValueLocus
|
|
84
|
+
| CellValueVipC
|
|
85
|
+
| CellValueVipCS
|
|
86
|
+
| CellValueVkgl;
|