@molgenis/vip-report-template 6.2.0 → 7.0.1
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 +9 -9
- 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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { ConfigFilterAllelicImbalance, FilterValueAllelicImbalance } from "../../../types/configFilterComposed";
|
|
3
|
+
import { FilterProps } from "../Filter.tsx";
|
|
4
|
+
import { ConfigFilterField, FilterValueCategorical } from "../../../types/configFilter";
|
|
5
|
+
import { FilterCategorical } from "../typed/FilterCategorical";
|
|
6
|
+
|
|
7
|
+
export const FilterAllelicImbalance: Component<
|
|
8
|
+
FilterProps<ConfigFilterAllelicImbalance, FilterValueAllelicImbalance>
|
|
9
|
+
> = (props) => {
|
|
10
|
+
const config = (): ConfigFilterField => ({
|
|
11
|
+
...props.config,
|
|
12
|
+
field: {
|
|
13
|
+
...props.config.viabField,
|
|
14
|
+
categories: { true: { label: "True" }, false: { label: "False" } },
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<FilterCategorical
|
|
20
|
+
config={config()}
|
|
21
|
+
value={props.value as FilterValueCategorical}
|
|
22
|
+
onValueChange={props.onValueChange}
|
|
23
|
+
onValueClear={props.onValueClear}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Component, Match, Switch } from "solid-js";
|
|
2
|
+
import { FilterValue } from "../../../types/configFilter";
|
|
3
|
+
import {
|
|
4
|
+
ConfigFilterAllelicImbalance,
|
|
5
|
+
ConfigFilterComposed,
|
|
6
|
+
ConfigFilterDeNovo,
|
|
7
|
+
ConfigFilterHpo,
|
|
8
|
+
ConfigFilterInheritanceMatch,
|
|
9
|
+
ConfigFilterLocus,
|
|
10
|
+
ConfigFilterVipC,
|
|
11
|
+
ConfigFilterVipCS,
|
|
12
|
+
FilterValueAllelicImbalance,
|
|
13
|
+
FilterValueDeNovo,
|
|
14
|
+
FilterValueHpo,
|
|
15
|
+
FilterValueInheritanceMatch,
|
|
16
|
+
FilterValueLocus,
|
|
17
|
+
FilterValueVipC,
|
|
18
|
+
FilterValueVipCS,
|
|
19
|
+
} from "../../../types/configFilterComposed";
|
|
20
|
+
import { FilterLocus } from "./FilterLocus";
|
|
21
|
+
import { ErrorNotification } from "../../ErrorNotification";
|
|
22
|
+
import { FilterHpo } from "./FilterHpo.tsx";
|
|
23
|
+
import { FilterProps } from "../Filter.tsx";
|
|
24
|
+
import { FilterAllelicImbalance } from "./FilterAllelicImbalance";
|
|
25
|
+
import { FilterInheritance } from "./FilterInheritance.tsx";
|
|
26
|
+
import { FilterDeNovo } from "./FilterDeNovo.tsx";
|
|
27
|
+
import { FilterVipC } from "./FilterVipC.tsx";
|
|
28
|
+
import { FilterVipCS } from "./FilterVipCS.tsx";
|
|
29
|
+
|
|
30
|
+
export const FilterComposed: Component<FilterProps<ConfigFilterComposed, FilterValue>> = (props) => {
|
|
31
|
+
const id = () => props.config.id;
|
|
32
|
+
return (
|
|
33
|
+
<Switch fallback={<ErrorNotification error={`unexpected field id ${id()}`} />}>
|
|
34
|
+
<Match when={id() === "composed/hpo"}>
|
|
35
|
+
<FilterHpo
|
|
36
|
+
config={props.config as ConfigFilterHpo}
|
|
37
|
+
value={props.value as FilterValueHpo | undefined}
|
|
38
|
+
onValueChange={props.onValueChange}
|
|
39
|
+
onValueClear={props.onValueClear}
|
|
40
|
+
/>
|
|
41
|
+
</Match>
|
|
42
|
+
<Match when={id() === "composed/locus"}>
|
|
43
|
+
<FilterLocus
|
|
44
|
+
config={props.config as ConfigFilterLocus}
|
|
45
|
+
value={props.value as FilterValueLocus | undefined}
|
|
46
|
+
onValueChange={props.onValueChange}
|
|
47
|
+
onValueClear={props.onValueClear}
|
|
48
|
+
/>
|
|
49
|
+
</Match>
|
|
50
|
+
<Match when={id() === "composed/allelicImbalance"}>
|
|
51
|
+
<FilterAllelicImbalance
|
|
52
|
+
config={props.config as ConfigFilterAllelicImbalance}
|
|
53
|
+
value={props.value as FilterValueAllelicImbalance | undefined}
|
|
54
|
+
onValueChange={props.onValueChange}
|
|
55
|
+
onValueClear={props.onValueClear}
|
|
56
|
+
/>
|
|
57
|
+
</Match>
|
|
58
|
+
<Match when={id() === "composed/inheritanceMatch"}>
|
|
59
|
+
<FilterInheritance
|
|
60
|
+
config={props.config as ConfigFilterInheritanceMatch}
|
|
61
|
+
value={props.value as FilterValueInheritanceMatch | undefined}
|
|
62
|
+
onValueChange={props.onValueChange}
|
|
63
|
+
onValueClear={props.onValueClear}
|
|
64
|
+
/>
|
|
65
|
+
</Match>
|
|
66
|
+
<Match when={id() === "composed/deNovo"}>
|
|
67
|
+
<FilterDeNovo
|
|
68
|
+
config={props.config as ConfigFilterDeNovo}
|
|
69
|
+
value={props.value as FilterValueDeNovo | undefined}
|
|
70
|
+
onValueChange={props.onValueChange}
|
|
71
|
+
onValueClear={props.onValueClear}
|
|
72
|
+
/>
|
|
73
|
+
</Match>
|
|
74
|
+
<Match when={id() === "composed/vipC"}>
|
|
75
|
+
<FilterVipC
|
|
76
|
+
config={props.config as ConfigFilterVipC}
|
|
77
|
+
value={props.value as FilterValueVipC | undefined}
|
|
78
|
+
onValueChange={props.onValueChange}
|
|
79
|
+
onValueClear={props.onValueClear}
|
|
80
|
+
/>
|
|
81
|
+
</Match>
|
|
82
|
+
<Match when={id() === "composed/vipCS"}>
|
|
83
|
+
<FilterVipCS
|
|
84
|
+
config={props.config as ConfigFilterVipCS}
|
|
85
|
+
value={props.value as FilterValueVipCS | undefined}
|
|
86
|
+
onValueChange={props.onValueChange}
|
|
87
|
+
onValueClear={props.onValueClear}
|
|
88
|
+
/>
|
|
89
|
+
</Match>
|
|
90
|
+
</Switch>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { ConfigFilterDeNovo, FilterValueDeNovo } from "../../../types/configFilterComposed";
|
|
3
|
+
import { FilterProps } from "../Filter.tsx";
|
|
4
|
+
import { ConfigFilterField, FilterValueCategorical } from "../../../types/configFilter";
|
|
5
|
+
import { FilterCategorical } from "../typed/FilterCategorical";
|
|
6
|
+
|
|
7
|
+
export const FilterDeNovo: Component<FilterProps<ConfigFilterDeNovo, FilterValueDeNovo>> = (props) => {
|
|
8
|
+
const config = (): ConfigFilterField => ({
|
|
9
|
+
...props.config,
|
|
10
|
+
field: {
|
|
11
|
+
...props.config.vidField,
|
|
12
|
+
categories: {
|
|
13
|
+
true: {
|
|
14
|
+
label: "True",
|
|
15
|
+
description: "At least one allele of the sample genotype is not inherited from a parent.",
|
|
16
|
+
},
|
|
17
|
+
potential: {
|
|
18
|
+
label: "Potential",
|
|
19
|
+
description:
|
|
20
|
+
"Denovo status cannot be determined, e.g. due to missing parent(s) or (partially) missing genotypes.",
|
|
21
|
+
},
|
|
22
|
+
false: { label: "False", description: "The entire sample genotype is inherited from their parents." },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<FilterCategorical
|
|
29
|
+
config={config()}
|
|
30
|
+
value={props.value as FilterValueCategorical}
|
|
31
|
+
onValueChange={props.onValueChange}
|
|
32
|
+
onValueClear={props.onValueClear}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterTyped } from "../typed/FilterTyped.tsx";
|
|
3
|
+
import { FilterProps, FilterValueChangeCallback } from "../Filter.tsx";
|
|
4
|
+
import { ConfigFilterHpo, FilterValueHpo } from "../../../types/configFilterComposed";
|
|
5
|
+
import { ConfigFilterField, FilterValueCategorical, FilterValueField } from "../../../types/configFilter";
|
|
6
|
+
|
|
7
|
+
export const FilterHpo: Component<FilterProps<ConfigFilterHpo, FilterValueHpo>> = (props) => {
|
|
8
|
+
return (
|
|
9
|
+
<FilterTyped
|
|
10
|
+
config={props.config as ConfigFilterField}
|
|
11
|
+
value={props.value as FilterValueCategorical}
|
|
12
|
+
onValueChange={props.onValueChange as FilterValueChangeCallback<FilterValueField>}
|
|
13
|
+
onValueClear={props.onValueClear}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { ConfigFilterInheritanceMatch, FilterValueInheritanceMatch } from "../../../types/configFilterComposed";
|
|
3
|
+
import { FilterProps } from "../Filter.tsx";
|
|
4
|
+
import { ConfigFilterField, FilterValueCategorical } from "../../../types/configFilter";
|
|
5
|
+
import { FilterCategorical } from "../typed/FilterCategorical";
|
|
6
|
+
|
|
7
|
+
export const FilterInheritance: Component<FilterProps<ConfigFilterInheritanceMatch, FilterValueInheritanceMatch>> = (
|
|
8
|
+
props,
|
|
9
|
+
) => {
|
|
10
|
+
const config = (): ConfigFilterField => ({
|
|
11
|
+
...props.config,
|
|
12
|
+
field: {
|
|
13
|
+
...props.config.vimField,
|
|
14
|
+
categories: {
|
|
15
|
+
true: {
|
|
16
|
+
label: "Match",
|
|
17
|
+
description:
|
|
18
|
+
"The inheritance pattern of the sample and its family members matches the known patterns of the gene associated with the variant.",
|
|
19
|
+
},
|
|
20
|
+
potential: {
|
|
21
|
+
label: "Potential match",
|
|
22
|
+
description:
|
|
23
|
+
"The match between the inheritance patterns of the sample and its family members and the known patterns of the gene associated with the variant cannot be determined with certainty. e.g. due to missing affected status of samples, missing genotypes or lack of known patterns for the gene.",
|
|
24
|
+
},
|
|
25
|
+
false: {
|
|
26
|
+
label: "No Match",
|
|
27
|
+
description:
|
|
28
|
+
"The inheritance pattern of the sample and its family members does not match the known patterns of the gene associated with the variant.",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<FilterCategorical
|
|
36
|
+
config={config()}
|
|
37
|
+
value={props.value as FilterValueCategorical}
|
|
38
|
+
onValueChange={props.onValueChange}
|
|
39
|
+
onValueClear={props.onValueClear}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Component, createEffect, createSignal } from "solid-js";
|
|
2
|
+
import { FilterWrapper } from "../FilterWrapper";
|
|
3
|
+
import { ButtonApply } from "../../form/ButtonApply";
|
|
4
|
+
import { ButtonReset } from "../../form/ButtonReset";
|
|
5
|
+
import { ConfigFilterLocus, FilterValueLocus } from "../../../types/configFilterComposed";
|
|
6
|
+
import { Select } from "../../form/Select";
|
|
7
|
+
import { Input } from "../../form/Input";
|
|
8
|
+
import { FilterProps } from "../Filter.tsx";
|
|
9
|
+
|
|
10
|
+
import { validateIntervalInput } from "../../../utils/utils.ts";
|
|
11
|
+
|
|
12
|
+
export const FilterLocus: Component<FilterProps<ConfigFilterLocus, FilterValueLocus>> = (props) => {
|
|
13
|
+
const [chromosome, setChromosome] = createSignal<string>();
|
|
14
|
+
const [startPosition, setStartPosition] = createSignal<string>();
|
|
15
|
+
const [endPosition, setEndPosition] = createSignal<string>();
|
|
16
|
+
const [error, setError] = createSignal<string>();
|
|
17
|
+
|
|
18
|
+
createEffect(() => {
|
|
19
|
+
if (props.value) {
|
|
20
|
+
setChromosome(props.value.chromosome);
|
|
21
|
+
setStartPosition(props.value.start?.toString());
|
|
22
|
+
setEndPosition(props.value.end?.toString());
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const onApply = () => {
|
|
27
|
+
const chr = chromosome();
|
|
28
|
+
if (chr === undefined) return;
|
|
29
|
+
const startStr = startPosition();
|
|
30
|
+
const endStr = endPosition();
|
|
31
|
+
const validationResult = validateIntervalInput(props.config.id, startStr, endStr);
|
|
32
|
+
if (validationResult !== undefined) {
|
|
33
|
+
setError(validationResult);
|
|
34
|
+
} else {
|
|
35
|
+
setError(undefined);
|
|
36
|
+
const start = startStr !== undefined ? parseInt(startStr) : undefined;
|
|
37
|
+
const end = endStr !== undefined ? parseInt(endStr) : undefined;
|
|
38
|
+
props.onValueChange({ value: { chromosome: chr, start, end } });
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const onReset = () => {
|
|
43
|
+
// filter might not have been applied, so clear local values in addition to generating event
|
|
44
|
+
setChromosome();
|
|
45
|
+
setStartPosition();
|
|
46
|
+
setEndPosition();
|
|
47
|
+
|
|
48
|
+
props.onValueClear();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<FilterWrapper config={props.config} error={error()}>
|
|
53
|
+
<div class="field is-grouped">
|
|
54
|
+
<div class="control">
|
|
55
|
+
<Select
|
|
56
|
+
placeholder={"Contig"}
|
|
57
|
+
value={chromosome()}
|
|
58
|
+
options={props.config.chromosomes.map((chromosome) => ({ id: chromosome, label: chromosome }))}
|
|
59
|
+
onValueChange={(e) => setChromosome(e.value)}
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="control is-expanded">
|
|
63
|
+
<Input placeholder="Start" value={startPosition()} onValueChange={(e) => setStartPosition(e.value)} />
|
|
64
|
+
</div>
|
|
65
|
+
<div class="control is-expanded">
|
|
66
|
+
<Input placeholder="End" value={endPosition()} onValueChange={(e) => setEndPosition(e.value)} />
|
|
67
|
+
</div>
|
|
68
|
+
<div class="control">
|
|
69
|
+
<ButtonApply onClick={onApply} />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<ButtonReset onClick={() => onReset()} />
|
|
73
|
+
</FilterWrapper>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterTyped } from "../typed/FilterTyped.tsx";
|
|
3
|
+
import { FilterProps, FilterValueChangeCallback } from "../Filter.tsx";
|
|
4
|
+
import { ConfigFilterVipC, FilterValueVipC } from "../../../types/configFilterComposed";
|
|
5
|
+
import { ConfigFilterField, FilterValueCategorical, FilterValueField } from "../../../types/configFilter";
|
|
6
|
+
|
|
7
|
+
export const FilterVipC: Component<FilterProps<ConfigFilterVipC, FilterValueVipC>> = (props) => {
|
|
8
|
+
return (
|
|
9
|
+
<FilterTyped
|
|
10
|
+
config={props.config as ConfigFilterField}
|
|
11
|
+
value={props.value as FilterValueCategorical}
|
|
12
|
+
onValueChange={props.onValueChange as FilterValueChangeCallback<FilterValueField>}
|
|
13
|
+
onValueClear={props.onValueClear}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterTyped } from "../typed/FilterTyped.tsx";
|
|
3
|
+
import { FilterProps, FilterValueChangeCallback } from "../Filter.tsx";
|
|
4
|
+
import { ConfigFilterVipCS, FilterValueVipCS } from "../../../types/configFilterComposed";
|
|
5
|
+
import { ConfigFilterField, FilterValueCategorical, FilterValueField } from "../../../types/configFilter";
|
|
6
|
+
|
|
7
|
+
export const FilterVipCS: Component<FilterProps<ConfigFilterVipCS, FilterValueVipCS>> = (props) => {
|
|
8
|
+
return (
|
|
9
|
+
<FilterTyped
|
|
10
|
+
config={props.config as ConfigFilterField}
|
|
11
|
+
value={props.value as FilterValueCategorical}
|
|
12
|
+
onValueChange={props.onValueChange as FilterValueChangeCallback<FilterValueField>}
|
|
13
|
+
onValueClear={props.onValueClear}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterProps } from "../Filter.tsx";
|
|
3
|
+
import { ConfigFilterAlt, ConfigFilterField, FilterValueAlt } from "../../../types/configFilter";
|
|
4
|
+
import { FilterString } from "../typed/FilterString.tsx";
|
|
5
|
+
import { FieldMetadataWrapper } from "../../../utils/vcf.ts";
|
|
6
|
+
|
|
7
|
+
export const FilterAlt: Component<FilterProps<ConfigFilterAlt, FilterValueAlt>> = (props) => {
|
|
8
|
+
const field: FieldMetadataWrapper = {
|
|
9
|
+
id: "alt",
|
|
10
|
+
number: {
|
|
11
|
+
type: "OTHER",
|
|
12
|
+
},
|
|
13
|
+
type: "STRING",
|
|
14
|
+
index: 0,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const config = (): ConfigFilterField => ({ ...props.config, field });
|
|
18
|
+
|
|
19
|
+
return <FilterString {...props} config={config()} />;
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterProps } from "../Filter.tsx";
|
|
3
|
+
import { ConfigFilterChrom, ConfigFilterField, FilterValueChrom } from "../../../types/configFilter";
|
|
4
|
+
import { FilterString } from "../typed/FilterString.tsx";
|
|
5
|
+
import { FieldMetadataWrapper } from "../../../utils/vcf.ts";
|
|
6
|
+
|
|
7
|
+
export const FilterChrom: Component<FilterProps<ConfigFilterChrom, FilterValueChrom>> = (props) => {
|
|
8
|
+
const field: FieldMetadataWrapper = {
|
|
9
|
+
id: "chrom",
|
|
10
|
+
number: {
|
|
11
|
+
type: "NUMBER",
|
|
12
|
+
count: 1,
|
|
13
|
+
},
|
|
14
|
+
type: "STRING",
|
|
15
|
+
required: true,
|
|
16
|
+
index: 0,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const config = (): ConfigFilterField => ({ ...props.config, field });
|
|
20
|
+
|
|
21
|
+
return <FilterString {...props} config={config()} />;
|
|
22
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterProps } from "../Filter.tsx";
|
|
3
|
+
import { ConfigFilterField, ConfigFilterFilter, FilterValueFilter } from "../../../types/configFilter";
|
|
4
|
+
import { FilterString } from "../typed/FilterString.tsx";
|
|
5
|
+
import { FieldMetadataWrapper } from "../../../utils/vcf.ts";
|
|
6
|
+
|
|
7
|
+
export const FilterFilter: Component<FilterProps<ConfigFilterFilter, FilterValueFilter>> = (props) => {
|
|
8
|
+
const field: FieldMetadataWrapper = {
|
|
9
|
+
id: "filter",
|
|
10
|
+
number: {
|
|
11
|
+
type: "OTHER",
|
|
12
|
+
},
|
|
13
|
+
type: "STRING",
|
|
14
|
+
index: 0,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const config = (): ConfigFilterField => ({ ...props.config, field });
|
|
18
|
+
|
|
19
|
+
return <FilterString {...props} config={config()} />;
|
|
20
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Component, Match, Switch } from "solid-js";
|
|
2
|
+
import {
|
|
3
|
+
ConfigFilterAlt,
|
|
4
|
+
ConfigFilterChrom,
|
|
5
|
+
ConfigFilterFilter,
|
|
6
|
+
ConfigFilterFixed,
|
|
7
|
+
ConfigFilterId,
|
|
8
|
+
ConfigFilterPos,
|
|
9
|
+
ConfigFilterQual,
|
|
10
|
+
ConfigFilterRef,
|
|
11
|
+
FilterValue,
|
|
12
|
+
FilterValueAlt,
|
|
13
|
+
FilterValueChrom,
|
|
14
|
+
FilterValueFilter,
|
|
15
|
+
FilterValueId,
|
|
16
|
+
FilterValuePos,
|
|
17
|
+
FilterValueQual,
|
|
18
|
+
FilterValueRef,
|
|
19
|
+
} from "../../../types/configFilter";
|
|
20
|
+
import { ErrorNotification } from "../../ErrorNotification";
|
|
21
|
+
import { FilterProps } from "../Filter.tsx";
|
|
22
|
+
import { FilterChrom } from "./FilterChrom.tsx";
|
|
23
|
+
import { FilterPos } from "./FilterPos.tsx";
|
|
24
|
+
import { FilterId } from "./FilterId.tsx";
|
|
25
|
+
import { FilterRef } from "./FilterRef.tsx";
|
|
26
|
+
import { FilterAlt } from "./FilterAlt.tsx";
|
|
27
|
+
import { FilterQual } from "./FilterQual.tsx";
|
|
28
|
+
import { FilterFilter } from "./FilterFilter.tsx";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Filter for a fixed VCF field (CHROM, POS, ID, REF, ALT, QUAL, FILTER) other than INFO
|
|
32
|
+
*/
|
|
33
|
+
export const FilterFixed: Component<FilterProps<ConfigFilterFixed, FilterValue>> = (props) => {
|
|
34
|
+
const id = () => props.config.id;
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Switch fallback={<ErrorNotification error={`unexpected field id ${id()}`} />}>
|
|
38
|
+
<Match when={id() === "fixed/chrom"}>
|
|
39
|
+
<FilterChrom
|
|
40
|
+
config={props.config as ConfigFilterChrom}
|
|
41
|
+
value={props.value as FilterValueChrom}
|
|
42
|
+
onValueChange={props.onValueChange}
|
|
43
|
+
onValueClear={props.onValueClear}
|
|
44
|
+
/>
|
|
45
|
+
</Match>
|
|
46
|
+
<Match when={id() === "fixed/pos"}>
|
|
47
|
+
<FilterPos
|
|
48
|
+
config={props.config as ConfigFilterPos}
|
|
49
|
+
value={props.value as FilterValuePos}
|
|
50
|
+
onValueChange={props.onValueChange}
|
|
51
|
+
onValueClear={props.onValueClear}
|
|
52
|
+
/>
|
|
53
|
+
</Match>
|
|
54
|
+
<Match when={id() === "fixed/id"}>
|
|
55
|
+
<FilterId
|
|
56
|
+
config={props.config as ConfigFilterId}
|
|
57
|
+
value={props.value as FilterValueId}
|
|
58
|
+
onValueChange={props.onValueChange}
|
|
59
|
+
onValueClear={props.onValueClear}
|
|
60
|
+
/>
|
|
61
|
+
</Match>
|
|
62
|
+
<Match when={id() === "fixed/ref"}>
|
|
63
|
+
<FilterRef
|
|
64
|
+
config={props.config as ConfigFilterRef}
|
|
65
|
+
value={props.value as FilterValueRef}
|
|
66
|
+
onValueChange={props.onValueChange}
|
|
67
|
+
onValueClear={props.onValueClear}
|
|
68
|
+
/>
|
|
69
|
+
</Match>
|
|
70
|
+
<Match when={id() === "fixed/alt"}>
|
|
71
|
+
<FilterAlt
|
|
72
|
+
config={props.config as ConfigFilterAlt}
|
|
73
|
+
value={props.value as FilterValueAlt}
|
|
74
|
+
onValueChange={props.onValueChange}
|
|
75
|
+
onValueClear={props.onValueClear}
|
|
76
|
+
/>
|
|
77
|
+
</Match>
|
|
78
|
+
<Match when={id() === "fixed/qual"}>
|
|
79
|
+
<FilterQual
|
|
80
|
+
config={props.config as ConfigFilterQual}
|
|
81
|
+
value={props.value as FilterValueQual}
|
|
82
|
+
onValueChange={props.onValueChange}
|
|
83
|
+
onValueClear={props.onValueClear}
|
|
84
|
+
/>
|
|
85
|
+
</Match>
|
|
86
|
+
<Match when={id() === "fixed/filter"}>
|
|
87
|
+
<FilterFilter
|
|
88
|
+
config={props.config as ConfigFilterFilter}
|
|
89
|
+
value={props.value as FilterValueFilter}
|
|
90
|
+
onValueChange={props.onValueChange}
|
|
91
|
+
onValueClear={props.onValueClear}
|
|
92
|
+
/>
|
|
93
|
+
</Match>
|
|
94
|
+
</Switch>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterProps } from "../Filter.tsx";
|
|
3
|
+
import { ConfigFilterField, ConfigFilterId, FilterValueId } from "../../../types/configFilter";
|
|
4
|
+
import { FilterString } from "../typed/FilterString.tsx";
|
|
5
|
+
import { FieldMetadataWrapper } from "../../../utils/vcf.ts";
|
|
6
|
+
|
|
7
|
+
export const FilterId: Component<FilterProps<ConfigFilterId, FilterValueId>> = (props) => {
|
|
8
|
+
const field: FieldMetadataWrapper = {
|
|
9
|
+
id: "id",
|
|
10
|
+
number: {
|
|
11
|
+
type: "OTHER",
|
|
12
|
+
},
|
|
13
|
+
type: "STRING",
|
|
14
|
+
index: 0,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const config = (): ConfigFilterField => ({ ...props.config, field });
|
|
18
|
+
|
|
19
|
+
return <FilterString {...props} config={config()} />;
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterProps } from "../Filter.tsx";
|
|
3
|
+
import { ConfigFilterField, ConfigFilterPos, FilterValuePos } from "../../../types/configFilter";
|
|
4
|
+
import { FilterInterval } from "../typed/FilterInterval.tsx";
|
|
5
|
+
import { FieldMetadataWrapper } from "../../../utils/vcf.ts";
|
|
6
|
+
|
|
7
|
+
export const FilterPos: Component<FilterProps<ConfigFilterPos, FilterValuePos>> = (props) => {
|
|
8
|
+
const field: FieldMetadataWrapper = {
|
|
9
|
+
id: "pos",
|
|
10
|
+
number: {
|
|
11
|
+
type: "NUMBER",
|
|
12
|
+
count: 1,
|
|
13
|
+
},
|
|
14
|
+
type: "INTEGER",
|
|
15
|
+
required: true,
|
|
16
|
+
index: 0,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const config = (): ConfigFilterField => ({ ...props.config, field });
|
|
20
|
+
|
|
21
|
+
return <FilterInterval {...props} config={config()} />;
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterProps } from "../Filter.tsx";
|
|
3
|
+
import { ConfigFilterField, ConfigFilterQual, FilterValueQual } from "../../../types/configFilter";
|
|
4
|
+
import { FilterInterval } from "../typed/FilterInterval.tsx";
|
|
5
|
+
import { FieldMetadataWrapper } from "../../../utils/vcf.ts";
|
|
6
|
+
|
|
7
|
+
export const FilterQual: Component<FilterProps<ConfigFilterQual, FilterValueQual>> = (props) => {
|
|
8
|
+
const field: FieldMetadataWrapper = {
|
|
9
|
+
id: "qual",
|
|
10
|
+
number: {
|
|
11
|
+
type: "NUMBER",
|
|
12
|
+
count: 1,
|
|
13
|
+
},
|
|
14
|
+
type: "FLOAT",
|
|
15
|
+
index: 0,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const config = (): ConfigFilterField => ({ ...props.config, field });
|
|
19
|
+
|
|
20
|
+
return <FilterInterval {...props} config={config()} />;
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { FilterProps } from "../Filter.tsx";
|
|
3
|
+
import { ConfigFilterField, ConfigFilterRef, FilterValueRef } from "../../../types/configFilter";
|
|
4
|
+
import { FilterString } from "../typed/FilterString.tsx";
|
|
5
|
+
import { FieldMetadataWrapper } from "../../../utils/vcf.ts";
|
|
6
|
+
|
|
7
|
+
export const FilterRef: Component<FilterProps<ConfigFilterRef, FilterValueRef>> = (props) => {
|
|
8
|
+
const field: FieldMetadataWrapper = {
|
|
9
|
+
id: "ref",
|
|
10
|
+
number: {
|
|
11
|
+
type: "NUMBER",
|
|
12
|
+
count: 1,
|
|
13
|
+
},
|
|
14
|
+
type: "STRING",
|
|
15
|
+
required: true,
|
|
16
|
+
index: 0,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const config = (): ConfigFilterField => ({ ...props.config, field });
|
|
20
|
+
|
|
21
|
+
return <FilterString {...props} config={config()} />;
|
|
22
|
+
};
|