@molgenis/vip-report-template 6.1.1 → 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 +9 -11
- 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 +35 -29
- 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 +8 -5
- package/src/components/DatasetDropdown.tsx +10 -23
- 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 +143 -0
- package/src/mocks/GRCh37/static.ts +63 -133
- package/src/mocks/GRCh37/vcf/family.vcf.blob +37 -31
- 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 +341 -328
- 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 -114
- 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 -183
- package/src/components/VariantsTable.tsx +0 -124
- 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 -259
- package/src/utils/csqUtils.ts +0 -27
- package/src/utils/decisionTreeUtils.ts +0 -14
- package/src/utils/field.ts +0 -49
- package/src/utils/query.ts +0 -154
- package/src/utils/viewUtils.ts +0 -32
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Component, Match, Switch } from "solid-js";
|
|
2
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
3
|
-
import { Consequence } from "./info/Consequence";
|
|
4
|
-
import { Field, FieldContext, FieldValue } from "./field/Field";
|
|
5
|
-
import { Gene } from "./info/Gene";
|
|
6
|
-
import { PubMed } from "./info/PubMed";
|
|
7
|
-
import { Hgvs } from "./info/Hgvs";
|
|
8
|
-
import { ClinVar } from "./info/ClinVar";
|
|
9
|
-
import { GnomAD } from "./info/GnomAD";
|
|
10
|
-
import { isAnyCsqInfo, isCsqInfo } from "../../utils/csqUtils";
|
|
11
|
-
import { Vkgl } from "./info/Vkgl";
|
|
12
|
-
import { InheritanceModes } from "./info/InheritanceModes";
|
|
13
|
-
import { Hpo } from "./info/Hpo";
|
|
14
|
-
import { VipC } from "./info/VipC";
|
|
15
|
-
|
|
16
|
-
export const Info: Component<{
|
|
17
|
-
info: FieldValue;
|
|
18
|
-
infoMeta: FieldMetadata;
|
|
19
|
-
context: FieldContext;
|
|
20
|
-
}> = (props) => {
|
|
21
|
-
return (
|
|
22
|
-
<Switch fallback={<Field {...props} />}>
|
|
23
|
-
<Match when={isCsqInfo(props.infoMeta, "Consequence")}>
|
|
24
|
-
<Consequence {...props} />
|
|
25
|
-
</Match>
|
|
26
|
-
<Match when={isCsqInfo(props.infoMeta, "PUBMED")}>
|
|
27
|
-
<PubMed {...props} />
|
|
28
|
-
</Match>
|
|
29
|
-
<Match when={isCsqInfo(props.infoMeta, "SYMBOL")}>
|
|
30
|
-
<Gene {...props} />
|
|
31
|
-
</Match>
|
|
32
|
-
<Match when={isCsqInfo(props.infoMeta, "InheritanceModesGene")}>
|
|
33
|
-
<InheritanceModes {...props} />
|
|
34
|
-
</Match>
|
|
35
|
-
<Match when={isCsqInfo(props.infoMeta, "gnomAD_AF")}>
|
|
36
|
-
<GnomAD {...props} />
|
|
37
|
-
</Match>
|
|
38
|
-
<Match when={isAnyCsqInfo(props.infoMeta, ["HGVSc", "HGVSp"])}>
|
|
39
|
-
<Hgvs {...props} />
|
|
40
|
-
</Match>
|
|
41
|
-
<Match when={isCsqInfo(props.infoMeta, "clinVar_CLNSIG")}>
|
|
42
|
-
<ClinVar {...props} />
|
|
43
|
-
</Match>
|
|
44
|
-
<Match when={isCsqInfo(props.infoMeta, "VKGL_CL")}>
|
|
45
|
-
<Vkgl {...props} />
|
|
46
|
-
</Match>
|
|
47
|
-
<Match when={isCsqInfo(props.infoMeta, "HPO")}>
|
|
48
|
-
<Hpo {...props} />
|
|
49
|
-
</Match>
|
|
50
|
-
<Match when={isCsqInfo(props.infoMeta, "VIPC")}>
|
|
51
|
-
<VipC {...props} />
|
|
52
|
-
</Match>
|
|
53
|
-
</Switch>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Component } from "solid-js";
|
|
2
|
-
import { HtsFileMetadata, Query, Sample } from "@molgenis/vip-report-api/src/Api";
|
|
3
|
-
import { Metadata } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
4
|
-
import api from "../../Api";
|
|
5
|
-
import { Filter, writeVcf } from "@molgenis/vip-report-vcf/src/VcfWriter";
|
|
6
|
-
|
|
7
|
-
export const RecordDownload: Component<{ recordsMetadata: Metadata; query?: Query; samples?: Sample[] }> = (props) => {
|
|
8
|
-
const filter = (): Filter | undefined =>
|
|
9
|
-
props.samples ? { samples: props.samples.map((sample) => sample.person.individualId) } : undefined;
|
|
10
|
-
|
|
11
|
-
function parseFilename(htsFile: HtsFileMetadata) {
|
|
12
|
-
return htsFile.uri.split("\\").pop()?.split("/").pop()?.split(".").shift();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// derived from https://stackoverflow.com/a/19176102
|
|
16
|
-
function getDateTimeString() {
|
|
17
|
-
const now = new Date();
|
|
18
|
-
|
|
19
|
-
const year = now.getFullYear().toString();
|
|
20
|
-
let month = (now.getMonth() + 1).toString();
|
|
21
|
-
let day = now.getDate().toString();
|
|
22
|
-
let hour = now.getHours().toString();
|
|
23
|
-
let minute = now.getMinutes().toString();
|
|
24
|
-
let second = now.getSeconds().toString();
|
|
25
|
-
|
|
26
|
-
if (month.length == 1) month = "0" + month;
|
|
27
|
-
if (day.length == 1) day = "0" + day;
|
|
28
|
-
if (hour.length == 1) hour = "0" + hour;
|
|
29
|
-
if (minute.length == 1) minute = "0" + minute;
|
|
30
|
-
if (second.length == 1) second = "0" + second;
|
|
31
|
-
|
|
32
|
-
return year + month + day + "_" + hour + minute + second;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function onClick() {
|
|
36
|
-
const handler = async () => {
|
|
37
|
-
const records = await api.getRecords({ query: props.query, size: Number.MAX_SAFE_INTEGER });
|
|
38
|
-
const vcf = writeVcf({ metadata: props.recordsMetadata, data: records.items.map((item) => item.data) }, filter());
|
|
39
|
-
|
|
40
|
-
const url = window.URL.createObjectURL(new Blob([vcf]));
|
|
41
|
-
const link = document.createElement("a");
|
|
42
|
-
link.href = url;
|
|
43
|
-
const htsFile = await api.getHtsFileMetadata();
|
|
44
|
-
const filename = parseFilename(htsFile) as string;
|
|
45
|
-
link.setAttribute("download", filename + "_report_" + getDateTimeString() + ".vcf");
|
|
46
|
-
document.body.appendChild(link);
|
|
47
|
-
link.click();
|
|
48
|
-
document.body.removeChild(link);
|
|
49
|
-
};
|
|
50
|
-
handler().catch((error) => console.error(error));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<div class="control">
|
|
55
|
-
<button
|
|
56
|
-
class="button is-info"
|
|
57
|
-
onClick={onClick}
|
|
58
|
-
title="Download vcf file with records matching filters and search queries"
|
|
59
|
-
>
|
|
60
|
-
<span class="icon is-small">
|
|
61
|
-
<i class="fas fa-download" />
|
|
62
|
-
</span>
|
|
63
|
-
</button>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Component } from "solid-js";
|
|
2
|
-
import { Value } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
3
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
4
|
-
import { FieldSingleValue } from "./FieldSingleValue";
|
|
5
|
-
import { FieldMultipleValue } from "./FieldMultipleValue";
|
|
6
|
-
import { Record } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
7
|
-
import { Item } from "@molgenis/vip-report-api/src/Api";
|
|
8
|
-
|
|
9
|
-
export type FieldProps = {
|
|
10
|
-
info: FieldValue;
|
|
11
|
-
infoMeta: FieldMetadata;
|
|
12
|
-
context: FieldContext;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type FieldValue = {
|
|
16
|
-
value: Value | Value[];
|
|
17
|
-
valueParent?: Value | Value[];
|
|
18
|
-
record: Item<Record>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export type FieldContext = {
|
|
22
|
-
genomeAssembly?: string;
|
|
23
|
-
isPossibleCompound?: boolean;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Field: Component<FieldProps> = (props) => {
|
|
27
|
-
return (
|
|
28
|
-
<>
|
|
29
|
-
{props.infoMeta.number.count === 1 ? (
|
|
30
|
-
<FieldSingleValue info={props.info.value as Value} infoMetadata={props.infoMeta} />
|
|
31
|
-
) : (
|
|
32
|
-
<FieldMultipleValue info={props.info.value as Value[]} infoMetadata={props.infoMeta} />
|
|
33
|
-
)}
|
|
34
|
-
</>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Component, For } from "solid-js";
|
|
2
|
-
import { Value } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
3
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
4
|
-
import { FieldSingleValue } from "./FieldSingleValue";
|
|
5
|
-
|
|
6
|
-
export const FieldMultipleValue: Component<{
|
|
7
|
-
info: Value[];
|
|
8
|
-
infoMetadata: FieldMetadata;
|
|
9
|
-
}> = (props) => {
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<For each={props.info}>
|
|
13
|
-
{(value, i) => (
|
|
14
|
-
<>
|
|
15
|
-
{i() !== 0 && <span>, </span>}
|
|
16
|
-
<FieldSingleValue info={value} infoMetadata={props.infoMetadata} />
|
|
17
|
-
</>
|
|
18
|
-
)}
|
|
19
|
-
</For>
|
|
20
|
-
</>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Component, Match, Switch } from "solid-js";
|
|
2
|
-
import { Value } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
3
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
4
|
-
import { FieldValueFloat } from "./FieldValueFloat";
|
|
5
|
-
import { FieldValueString } from "./FieldValueString";
|
|
6
|
-
import { FieldValueCharacter } from "./FieldValueCharacter";
|
|
7
|
-
import { FieldValueInteger } from "./FieldValueInteger";
|
|
8
|
-
import { FieldValueFlag } from "./FieldValueFlag";
|
|
9
|
-
import { Error } from "../../Error";
|
|
10
|
-
|
|
11
|
-
export const FieldSingleValue: Component<{
|
|
12
|
-
info: Value;
|
|
13
|
-
infoMetadata: FieldMetadata;
|
|
14
|
-
}> = (props) => {
|
|
15
|
-
const type = () => props.infoMetadata.type;
|
|
16
|
-
return (
|
|
17
|
-
<Switch fallback={<Error error={`invalid info type ${type()}`} />}>
|
|
18
|
-
<Match when={type() === "CATEGORICAL" || type() === "STRING"}>
|
|
19
|
-
<FieldValueString value={props.info as string} />
|
|
20
|
-
</Match>
|
|
21
|
-
<Match when={type() === "CHARACTER"}>
|
|
22
|
-
<FieldValueCharacter value={props.info as string} />
|
|
23
|
-
</Match>
|
|
24
|
-
<Match when={type() === "FLAG"}>
|
|
25
|
-
<FieldValueFlag value={props.info as boolean} />
|
|
26
|
-
</Match>
|
|
27
|
-
<Match when={type() === "FLOAT"}>
|
|
28
|
-
<FieldValueFloat value={props.info as number} />
|
|
29
|
-
</Match>
|
|
30
|
-
<Match when={type() === "INTEGER"}>
|
|
31
|
-
<FieldValueInteger value={props.info as number} />
|
|
32
|
-
</Match>
|
|
33
|
-
</Switch>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { Component, Show } from "solid-js";
|
|
2
|
-
import { FieldProps } from "../field/Field";
|
|
3
|
-
import { Anchor } from "../../Anchor";
|
|
4
|
-
import { Abbr } from "../../Abbr";
|
|
5
|
-
import { getCsqInfo, getCsqInfoIndex } from "../../../utils/csqUtils";
|
|
6
|
-
|
|
7
|
-
export const ClinVar: Component<FieldProps> = (props) => {
|
|
8
|
-
const label = () => {
|
|
9
|
-
const classes = props.info.value as string[] | null;
|
|
10
|
-
return classes
|
|
11
|
-
? classes
|
|
12
|
-
.map((token) => {
|
|
13
|
-
switch (token.toLowerCase()) {
|
|
14
|
-
case "benign":
|
|
15
|
-
return "B";
|
|
16
|
-
case "likely_benign":
|
|
17
|
-
return "LB";
|
|
18
|
-
case "uncertain_significance":
|
|
19
|
-
return "VUS";
|
|
20
|
-
case "likely_pathogenic":
|
|
21
|
-
return "LP";
|
|
22
|
-
case "pathogenic":
|
|
23
|
-
return "P";
|
|
24
|
-
case "conflicting_interpretations_of_pathogenicity":
|
|
25
|
-
return "Conflict";
|
|
26
|
-
default:
|
|
27
|
-
return token;
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
.join(", ")
|
|
31
|
-
: null;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const href = () => {
|
|
35
|
-
const clinVarIdsField = getCsqInfoIndex(props.infoMeta, "clinVar_CLNID");
|
|
36
|
-
const clinVarIds = clinVarIdsField !== -1 ? (getCsqInfo(props.info, clinVarIdsField) as number[]) : [];
|
|
37
|
-
return clinVarIds.length === 1 ? `https://www.ncbi.nlm.nih.gov/clinvar/variation/${clinVarIds[0]}/` : undefined;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const description = () => {
|
|
41
|
-
const statusField = getCsqInfoIndex(props.infoMeta, "clinVar_CLNREVSTAT");
|
|
42
|
-
const status = statusField !== -1 ? (getCsqInfo(props.info, statusField) as string[]) : [];
|
|
43
|
-
if (status.length === 0) return;
|
|
44
|
-
|
|
45
|
-
let description;
|
|
46
|
-
if (status.length === 1 && status.includes("practice_guideline")) {
|
|
47
|
-
description = "\u2605\u2605\u2605\u2605";
|
|
48
|
-
} else if (status.length === 1 && status.includes("reviewed_by_expert_panel")) {
|
|
49
|
-
description = "\u2605\u2605\u2605\u2606";
|
|
50
|
-
} else if (
|
|
51
|
-
status.length === 3 &&
|
|
52
|
-
status.includes("criteria_provided") &&
|
|
53
|
-
status.includes("_multiple_submitters") &&
|
|
54
|
-
status.includes("_no_conflicts")
|
|
55
|
-
) {
|
|
56
|
-
description = "\u2605\u2605\u2606\u2606";
|
|
57
|
-
} else if (
|
|
58
|
-
status.length === 2 &&
|
|
59
|
-
status.includes("criteria_provided") &&
|
|
60
|
-
status.includes("_conflicting_interpretations")
|
|
61
|
-
) {
|
|
62
|
-
description = "\u2605\u2606\u2606\u2606";
|
|
63
|
-
} else if (status.length === 2 && status.includes("criteria_provided") && status.includes("_single_submitter")) {
|
|
64
|
-
description = "\u2605\u2606\u2606\u2606";
|
|
65
|
-
} else {
|
|
66
|
-
description = "\u2606\u2606\u2606\u2606";
|
|
67
|
-
}
|
|
68
|
-
description += " (" + status.map((status) => status.replaceAll("_", " ").trim()).join(", ") + ")";
|
|
69
|
-
return description;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<Show when={label()} keyed>
|
|
74
|
-
{(label) => (
|
|
75
|
-
<Anchor href={href()}>
|
|
76
|
-
{description() ? <Abbr title={description()!} value={label} /> : <span>{label}</span>}
|
|
77
|
-
</Anchor>
|
|
78
|
-
)}
|
|
79
|
-
</Show>
|
|
80
|
-
);
|
|
81
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Component } from "solid-js";
|
|
2
|
-
import { FieldProps } from "../field/Field";
|
|
3
|
-
import { Abbr } from "../../Abbr";
|
|
4
|
-
|
|
5
|
-
export const Consequence: Component<FieldProps> = (props) => {
|
|
6
|
-
const consequence = (): string[] => props.info.value as string[];
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<span>{consequence()[0]}</span>
|
|
11
|
-
{consequence().length > 1 && (
|
|
12
|
-
<span>
|
|
13
|
-
, <Abbr title={consequence().slice(1).join(", ")} value={"\u2026"} />
|
|
14
|
-
</span>
|
|
15
|
-
)}
|
|
16
|
-
</>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Component, createMemo, Show } from "solid-js";
|
|
2
|
-
import { Anchor } from "../../Anchor";
|
|
3
|
-
import { FieldProps } from "../field/Field";
|
|
4
|
-
import { ValueFlag, ValueString } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
5
|
-
import { getCsqInfo, getCsqInfoIndex } from "../../../utils/csqUtils";
|
|
6
|
-
import { Abbr } from "../../Abbr";
|
|
7
|
-
|
|
8
|
-
export const Gene: Component<FieldProps> = (props) => {
|
|
9
|
-
const symbol = (): ValueString => props.info.value as ValueString;
|
|
10
|
-
|
|
11
|
-
const symbolSource = createMemo((): ValueString | undefined => {
|
|
12
|
-
if (symbol() === null) return undefined;
|
|
13
|
-
|
|
14
|
-
const symbolSourceFieldIndex = getCsqInfoIndex(props.infoMeta, "SYMBOL_SOURCE");
|
|
15
|
-
return symbolSourceFieldIndex !== -1 ? (getCsqInfo(props.info, symbolSourceFieldIndex) as ValueString) : undefined;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const geneId = createMemo((): ValueString | undefined => {
|
|
19
|
-
if (symbol() === null) return undefined;
|
|
20
|
-
|
|
21
|
-
const geneFieldIndex = getCsqInfoIndex(props.infoMeta, "Gene");
|
|
22
|
-
return geneFieldIndex !== -1 ? (getCsqInfo(props.info, geneFieldIndex) as ValueString) : undefined;
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const href = (): string | undefined => {
|
|
26
|
-
if (symbol() === null) return undefined;
|
|
27
|
-
|
|
28
|
-
const queryString =
|
|
29
|
-
symbolSource() === "EntrezGene" && geneId()
|
|
30
|
-
? `query=ncbi_gene_id:${geneId()!}`
|
|
31
|
-
: `query=${encodeURIComponent(symbol()!)}&filter=document_type:%22gene%22`;
|
|
32
|
-
return `https://www.genenames.org/tools/search/#!/?${queryString}`;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const incompletePenetrance = (): ValueFlag | undefined => {
|
|
36
|
-
const ipFieldIndex = getCsqInfoIndex(props.infoMeta, "IncompletePenetrance");
|
|
37
|
-
return ipFieldIndex !== -1 ? (getCsqInfo(props.info, ipFieldIndex) as ValueFlag) : undefined;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<Show when={symbol()} keyed>
|
|
42
|
-
{(symbol) => (
|
|
43
|
-
<>
|
|
44
|
-
<Anchor href={href()}>
|
|
45
|
-
<span>{symbol}</span>
|
|
46
|
-
</Anchor>
|
|
47
|
-
{incompletePenetrance() && (
|
|
48
|
-
<span class="ml-1">
|
|
49
|
-
<Abbr title="gene is known for incomplete penetrance" value="IP" />
|
|
50
|
-
</span>
|
|
51
|
-
)}
|
|
52
|
-
</>
|
|
53
|
-
)}
|
|
54
|
-
</Show>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Component, Show } from "solid-js";
|
|
2
|
-
import { FieldValueFloat } from "../field/FieldValueFloat";
|
|
3
|
-
import { FieldProps } from "../field/Field";
|
|
4
|
-
import { ValueFloat } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
5
|
-
import { Anchor } from "../../Anchor";
|
|
6
|
-
import { getCsqInfo, getCsqInfoIndex } from "../../../utils/csqUtils";
|
|
7
|
-
|
|
8
|
-
export const GnomAD: Component<FieldProps> = (props) => {
|
|
9
|
-
const af = (): number | null => props.info.value as ValueFloat;
|
|
10
|
-
|
|
11
|
-
const qcIndex = (): number => getCsqInfoIndex(props.infoMeta, "gnomAD_QC");
|
|
12
|
-
const qc = (): string[] => (qcIndex() !== -1 ? (getCsqInfo(props.info, qcIndex()) as string[]) : []);
|
|
13
|
-
const covIndex = (): number => getCsqInfoIndex(props.infoMeta, "gnomAD_COV");
|
|
14
|
-
const cov = (): number | null => (covIndex() !== -1 ? (getCsqInfo(props.info, covIndex()) as number) : null);
|
|
15
|
-
|
|
16
|
-
const href = (): string | undefined => {
|
|
17
|
-
let href;
|
|
18
|
-
if (af() !== null) {
|
|
19
|
-
const record = props.info.record.data;
|
|
20
|
-
// FIXME record.a incorrect: select record.a through CSQ:ALLELE_NUM
|
|
21
|
-
const variantId = [record.c, record.p, record.r, record.a].join("-");
|
|
22
|
-
const dataset = "gnomad_r4";
|
|
23
|
-
href = `https://gnomad.broadinstitute.org/variant/${encodeURIComponent(variantId)}?dataset=${dataset}`;
|
|
24
|
-
}
|
|
25
|
-
return href;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<Show when={af() !== null}>
|
|
30
|
-
<Show when={href()} fallback={<FieldValueFloat value={af()} />} keyed>
|
|
31
|
-
{(href) => (
|
|
32
|
-
<>
|
|
33
|
-
<Anchor href={href}>
|
|
34
|
-
<FieldValueFloat value={af()} />
|
|
35
|
-
</Anchor>
|
|
36
|
-
<Show when={qc().length > 0}>
|
|
37
|
-
<abbr title={"Failed quality control filters: " + qc().join(", ")} class="ml-1 is-clickable">
|
|
38
|
-
<i class="fas fa-circle-exclamation has-text-warning" />
|
|
39
|
-
</abbr>
|
|
40
|
-
</Show>
|
|
41
|
-
<Show when={cov() != null && cov() < 0.5}>
|
|
42
|
-
<abbr
|
|
43
|
-
title="This variant is covered in fewer than 50% of individuals in gnomAD. This may indicate a low-quality site."
|
|
44
|
-
class="ml-1 is-clickable"
|
|
45
|
-
>
|
|
46
|
-
<i class="fas fa-circle-exclamation has-text-warning" />
|
|
47
|
-
</abbr>
|
|
48
|
-
</Show>
|
|
49
|
-
</>
|
|
50
|
-
)}
|
|
51
|
-
</Show>
|
|
52
|
-
</Show>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Component, For, Show } from "solid-js";
|
|
2
|
-
import { Anchor } from "../../Anchor";
|
|
3
|
-
import { FieldProps } from "../field/Field";
|
|
4
|
-
import { getCsqInfo, getCsqInfoIndex } from "../../../utils/csqUtils";
|
|
5
|
-
import { FieldValueString } from "../field/FieldValueString";
|
|
6
|
-
|
|
7
|
-
type HpoTerm = {
|
|
8
|
-
id: string;
|
|
9
|
-
href: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const Hpo: Component<FieldProps> = (props) => {
|
|
13
|
-
const hpoTerms = (): HpoTerm[] =>
|
|
14
|
-
(props.info.value as string[]).map((hpoTermId) => ({
|
|
15
|
-
id: hpoTermId,
|
|
16
|
-
href: `https://hpo.jax.org/app/browse/term/${encodeURI(hpoTermId)}`,
|
|
17
|
-
}));
|
|
18
|
-
|
|
19
|
-
const gadoIndex = (): number => getCsqInfoIndex(props.infoMeta, "GADO_PD");
|
|
20
|
-
const gadoClass = (): string | null => (gadoIndex() !== -1 ? (getCsqInfo(props.info, gadoIndex()) as string) : null);
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<>
|
|
24
|
-
<For each={hpoTerms()}>
|
|
25
|
-
{(hpoTerm, i) => (
|
|
26
|
-
<>
|
|
27
|
-
{i() !== 0 && <span>, </span>}
|
|
28
|
-
<Anchor href={hpoTerm.href}>
|
|
29
|
-
<FieldValueString value={hpoTerm.id} />
|
|
30
|
-
</Anchor>
|
|
31
|
-
</>
|
|
32
|
-
)}
|
|
33
|
-
</For>
|
|
34
|
-
<Show when={gadoClass() !== null && gadoClass() === "LC"} keyed>
|
|
35
|
-
<abbr
|
|
36
|
-
title="Gene phenotype relation predicted by GADO with low confidence; Z-Score greater than 3 but below 5."
|
|
37
|
-
class="ml-1 is-clickable"
|
|
38
|
-
>
|
|
39
|
-
<i class="fas fa-question-circle has-text-info" />
|
|
40
|
-
</abbr>
|
|
41
|
-
</Show>
|
|
42
|
-
<Show when={gadoClass() !== null && gadoClass() === "HC"} keyed>
|
|
43
|
-
<abbr
|
|
44
|
-
title="Gene phenotype relation predicted by GADO with high confidence; Z-Score greater than 5."
|
|
45
|
-
class="ml-1 is-clickable"
|
|
46
|
-
>
|
|
47
|
-
<i class="fas fa-info-circle has-text-info" />
|
|
48
|
-
</abbr>
|
|
49
|
-
</Show>
|
|
50
|
-
</>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Component, Show } from "solid-js";
|
|
2
|
-
import { Value, ValueString } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
3
|
-
import { FieldProps } from "../field/Field";
|
|
4
|
-
import { FieldMultipleValue } from "../field/FieldMultipleValue";
|
|
5
|
-
|
|
6
|
-
export const InheritanceModes: Component<FieldProps> = (props) => {
|
|
7
|
-
const inheritanceModesGene: ValueString[] = props.info.value as ValueString[];
|
|
8
|
-
let isArInheritance = false;
|
|
9
|
-
if (inheritanceModesGene.includes("AR") || inheritanceModesGene.length === 0) {
|
|
10
|
-
isArInheritance = props.context.isPossibleCompound !== undefined && props.context.isPossibleCompound;
|
|
11
|
-
}
|
|
12
|
-
return (
|
|
13
|
-
<>
|
|
14
|
-
<FieldMultipleValue info={props.info.value as Value[]} infoMetadata={props.infoMeta} />
|
|
15
|
-
<Show when={isArInheritance} keyed>
|
|
16
|
-
<abbr title="Variant is possibly part of a compound." class="ml-1 is-clickable">
|
|
17
|
-
<i class="fas fa-circle-exclamation has-text-info" />
|
|
18
|
-
</abbr>
|
|
19
|
-
</Show>
|
|
20
|
-
</>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Component, Show } from "solid-js";
|
|
2
|
-
import { Abbr } from "../../Abbr";
|
|
3
|
-
import { FieldProps } from "../field/Field";
|
|
4
|
-
import { ValueString } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
5
|
-
import { getCsqInfo, getCsqInfoIndex } from "../../../utils/csqUtils";
|
|
6
|
-
|
|
7
|
-
export const VipC: Component<FieldProps> = (props) => {
|
|
8
|
-
const value = () => props.info.value as ValueString;
|
|
9
|
-
const description = () => {
|
|
10
|
-
const fieldIndex = getCsqInfoIndex(props.infoMeta, "VIPP");
|
|
11
|
-
return fieldIndex !== -1 ? (getCsqInfo(props.info, fieldIndex) as ValueString[]) : null;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Show when={value()} keyed>
|
|
16
|
-
{(value) => (
|
|
17
|
-
<Show when={description()} fallback={value} keyed>
|
|
18
|
-
{(description) => <Abbr title={description.join(", ")} value={value} />}
|
|
19
|
-
</Show>
|
|
20
|
-
)}
|
|
21
|
-
</Show>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Component, Show } from "solid-js";
|
|
2
|
-
import { Abbr } from "../../Abbr";
|
|
3
|
-
import { FieldProps } from "../field/Field";
|
|
4
|
-
import { ValueString } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
5
|
-
import { getCsqInfo, getCsqInfoIndex } from "../../../utils/csqUtils";
|
|
6
|
-
|
|
7
|
-
export const Vkgl: Component<FieldProps> = (props) => {
|
|
8
|
-
const value = () => props.info.value as ValueString;
|
|
9
|
-
const title = () => {
|
|
10
|
-
if (value() === null) return undefined;
|
|
11
|
-
|
|
12
|
-
const labs: { [key: string]: string } = {
|
|
13
|
-
VKGL_AMC: "AMC",
|
|
14
|
-
VKGL_ERASMUS: "Erasmus",
|
|
15
|
-
VKGL_LUMC: "LUMC",
|
|
16
|
-
VKGL_NKI: "NKI",
|
|
17
|
-
VKGL_RADBOUD_MUMC: "Radboud/MUMC",
|
|
18
|
-
VKGL_UMCG: "UMCG",
|
|
19
|
-
VKGL_UMCU: "UMCU",
|
|
20
|
-
VKGL_VUMC: "VUMC",
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const descriptions = [];
|
|
24
|
-
for (const key in labs) {
|
|
25
|
-
const fieldIndex = getCsqInfoIndex(props.infoMeta, key);
|
|
26
|
-
if (fieldIndex !== -1) {
|
|
27
|
-
const value = getCsqInfo(props.info, fieldIndex) as ValueString;
|
|
28
|
-
if (value !== null) descriptions.push(`${labs[key]}:${value}`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return descriptions.length > 0 ? descriptions.join(", ") : null;
|
|
32
|
-
};
|
|
33
|
-
return (
|
|
34
|
-
<Show when={value()} keyed>
|
|
35
|
-
{(value) => (
|
|
36
|
-
<Show when={title()} fallback={<span>{value}</span>} keyed>
|
|
37
|
-
{(title) => <Abbr title={title} value={value} />}
|
|
38
|
-
</Show>
|
|
39
|
-
)}
|
|
40
|
-
</Show>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
##fileformat=VCFv4.3
|
|
2
|
-
##fileDate=20200320
|
|
3
|
-
##contig=<ID=1,length=249250621,assembly=b37>
|
|
4
|
-
##contig=<ID=2,length=243199373,assembly=b37>
|
|
5
|
-
##contig=<ID=3,length=198022430,assembly=b37>
|
|
6
|
-
##contig=<ID=4,length=191154276,assembly=b37>
|
|
7
|
-
##contig=<ID=5,length=180915260,assembly=b37>
|
|
8
|
-
##contig=<ID=6,length=171115067,assembly=b37>
|
|
9
|
-
##contig=<ID=7,length=159138663,assembly=b37>
|
|
10
|
-
##contig=<ID=8,length=146364022,assembly=b37>
|
|
11
|
-
##contig=<ID=9,length=141213431,assembly=b37>
|
|
12
|
-
##contig=<ID=10,length=135534747,assembly=b37>
|
|
13
|
-
##contig=<ID=11,length=135006516,assembly=b37>
|
|
14
|
-
##contig=<ID=12,length=133851895,assembly=b37>
|
|
15
|
-
##contig=<ID=13,length=115169878,assembly=b37>
|
|
16
|
-
##contig=<ID=14,length=107349540,assembly=b37>
|
|
17
|
-
##contig=<ID=15,length=102531392,assembly=b37>
|
|
18
|
-
##contig=<ID=16,length=90354753,assembly=b37>
|
|
19
|
-
##contig=<ID=17,length=81195210,assembly=b37>
|
|
20
|
-
##contig=<ID=18,length=78077248,assembly=b37>
|
|
21
|
-
##contig=<ID=19,length=59128983,assembly=b37>
|
|
22
|
-
##contig=<ID=20,length=63025520,assembly=b37>
|
|
23
|
-
##contig=<ID=21,length=48129895,assembly=b37>
|
|
24
|
-
##contig=<ID=22,length=51304566,assembly=b37>
|
|
25
|
-
##contig=<ID=X,length=155270560,assembly=b37>
|
|
26
|
-
##contig=<ID=Y,length=59373566,assembly=b37>
|
|
27
|
-
##contig=<ID=MT,length=16569,assembly=b37>
|
|
28
|
-
##ALT=<ID=DEL,Description="Deletion">
|
|
29
|
-
##ALT=<ID=INS,Description="Insertion">
|
|
30
|
-
##INFO=<ID=SVLEN,Number=.,Type=Integer,Description="Difference in length between REF and ALT alleles">
|
|
31
|
-
##INFO=<ID=SVTYPE,Number=1,Type=String,Description="Type of structural variant">
|
|
32
|
-
##INFO=<ID=MATEID,Number=.,Type=String,Description="ID of mate breakend">
|
|
33
|
-
##INFO=<ID=BND_DEPTH,Number=1,Type=Integer,Description="Read depth at local translocation breakend">
|
|
34
|
-
##INFO=<ID=MATE_BND_DEPTH,Number=1,Type=Integer,Description="Read depth at remote translocation mate breakend">
|
|
35
|
-
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
|
|
36
|
-
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth">
|
|
37
|
-
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Patient Father Mother Sister Nephew Unrelated
|
|
38
|
-
1 10042538 . C T . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
39
|
-
1 152520788 symbolic1 A <DEL> . PASS SVLEN=-49314;SVTYPE=DEL GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
40
|
-
2 47635667 symbolic2 G <INS> . PASS SVLEN=-49314;SVTYPE=INS GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
41
|
-
4 106320294 . G A . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
42
|
-
7 42017311 single_breakend_nation C C. . PASS SVTYPE=BND GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
43
|
-
7 42064957 . GACTC G . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
44
|
-
8 61765143 breakend1 G ]11:134014225]G . PASS SVTYPE=BND;MATEID=breakend2;BND_DEPTH=26;MATE_BND_DEPTH=39 GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
45
|
-
8 145140500 . CAG C . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
46
|
-
9 107546633 . AAAGAT A . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
47
|
-
10 126091499 . G C . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
48
|
-
11 134014225 breakend2 G G[8:61765143[ . PASS SVTYPE=BND;MATEID=breakend1;BND_DEPTH=39;MATE_BND_DEPTH=26 GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
49
|
-
13 77570128 . G A . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
50
|
-
14 89336407 . TG T . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
51
|
-
14 105167860 . T G . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
52
|
-
17 29556064 . AC A . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
53
|
-
17 29663879 . T G . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
54
|
-
19 11216146 . C G . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
55
|
-
19 17451997 . GA G . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
56
|
-
20 62326992 . C T . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
57
|
-
22 50627593 . C CTG . . . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
58
|
-
22 50721546 . C T . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
59
|
-
X 48933021 x_chrom A T . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|
|
60
|
-
Y 2655641 y_chrom G A . PASS . GT:DP 1:50 0:10 . . 1:50 1:50
|
|
61
|
-
MT 15326 mt_chrom A G . PASS . GT:DP 1|0:50 0|0:10 0|0:50 0|0:50 0|0:50 0|0:50
|