@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,125 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "vitest";
|
|
2
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
3
|
-
import { getConsequenceLabel, getRecordSamples, getSpecificConsequence } from "../utils/viewUtils";
|
|
4
|
-
import { Value, ValueArray } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
5
|
-
import { Record } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
6
|
-
import { Sample } from "@molgenis/vip-report-api/src/Api";
|
|
7
|
-
|
|
8
|
-
const fieldMetaCsq: FieldMetadata = {
|
|
9
|
-
description: "Consequence",
|
|
10
|
-
id: "Consequence",
|
|
11
|
-
number: { type: "PER_ALT" },
|
|
12
|
-
type: "STRING",
|
|
13
|
-
};
|
|
14
|
-
const fieldMeta1: FieldMetadata = { description: "fake 1", id: "field1", number: { type: "NUMBER" }, type: "STRING" };
|
|
15
|
-
const fieldMeta2: FieldMetadata = { description: "fake 2", id: "field2", number: { type: "NUMBER" }, type: "STRING" };
|
|
16
|
-
|
|
17
|
-
const value1a: Value = "testValue1a";
|
|
18
|
-
const value2a: Value = "testValue2a";
|
|
19
|
-
const value3a: Value = "testValue3a";
|
|
20
|
-
const value1b: Value = "testValue1b";
|
|
21
|
-
const value2b: Value = "testValue2b";
|
|
22
|
-
const value3b: Value = "testValue3b";
|
|
23
|
-
const valueArraya: ValueArray = [value1a, value2a, value3a];
|
|
24
|
-
const valueArrayb: ValueArray = [value1b, value2b, value3b];
|
|
25
|
-
|
|
26
|
-
test("Get specific consequence", () => {
|
|
27
|
-
expect(getSpecificConsequence([valueArraya, valueArrayb], 1)).toBe(valueArrayb);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
test("Get specific consequence - out of bounds", () => {
|
|
31
|
-
expect(getSpecificConsequence([valueArraya, valueArrayb], 9)).toStrictEqual([] as ValueArray);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
test("Get specific consequence - -1", () => {
|
|
35
|
-
expect(() => getSpecificConsequence([valueArraya, valueArrayb], -1)).toThrowError(
|
|
36
|
-
"Consequences index must be 0 or higher.",
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
test("Get Consequence Label", () => {
|
|
41
|
-
expect(getConsequenceLabel([valueArraya, valueArrayb], 1, [fieldMeta1, fieldMetaCsq, fieldMeta2])).toBe(
|
|
42
|
-
"testValue2b",
|
|
43
|
-
);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
test("Get Record samples", () => {
|
|
47
|
-
const patient: Sample = {
|
|
48
|
-
index: 0,
|
|
49
|
-
person: {
|
|
50
|
-
familyId: "FAM001",
|
|
51
|
-
individualId: "Patient",
|
|
52
|
-
sex: "FEMALE",
|
|
53
|
-
affectedStatus: "AFFECTED",
|
|
54
|
-
maternalId: "Mother",
|
|
55
|
-
paternalId: "Father",
|
|
56
|
-
},
|
|
57
|
-
proband: true,
|
|
58
|
-
};
|
|
59
|
-
const father: Sample = {
|
|
60
|
-
index: 1,
|
|
61
|
-
person: {
|
|
62
|
-
familyId: "FAM001",
|
|
63
|
-
individualId: "Father",
|
|
64
|
-
sex: "MALE",
|
|
65
|
-
affectedStatus: "UNAFFECTED",
|
|
66
|
-
maternalId: "",
|
|
67
|
-
paternalId: "",
|
|
68
|
-
},
|
|
69
|
-
proband: false,
|
|
70
|
-
};
|
|
71
|
-
const mother: Sample = {
|
|
72
|
-
index: 2,
|
|
73
|
-
person: {
|
|
74
|
-
familyId: "FAM001",
|
|
75
|
-
individualId: "Mother",
|
|
76
|
-
sex: "FEMALE",
|
|
77
|
-
affectedStatus: "UNAFFECTED",
|
|
78
|
-
maternalId: "",
|
|
79
|
-
paternalId: "",
|
|
80
|
-
},
|
|
81
|
-
proband: false,
|
|
82
|
-
};
|
|
83
|
-
const samples = [patient, mother, father];
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
85
|
-
// @ts-ignore
|
|
86
|
-
const record: Record = { a: [], c: "", f: [], i: [], n: undefined, p: 0, q: undefined, r: "", s: samples };
|
|
87
|
-
|
|
88
|
-
const result = getRecordSamples(record, patient, samples);
|
|
89
|
-
expect(result).toContainEqual({
|
|
90
|
-
index: 0,
|
|
91
|
-
person: {
|
|
92
|
-
affectedStatus: "AFFECTED",
|
|
93
|
-
familyId: "FAM001",
|
|
94
|
-
individualId: "Patient",
|
|
95
|
-
maternalId: "Mother",
|
|
96
|
-
paternalId: "Father",
|
|
97
|
-
sex: "FEMALE",
|
|
98
|
-
},
|
|
99
|
-
proband: true,
|
|
100
|
-
});
|
|
101
|
-
expect(result).toContainEqual({
|
|
102
|
-
index: 2,
|
|
103
|
-
person: {
|
|
104
|
-
affectedStatus: "UNAFFECTED",
|
|
105
|
-
familyId: "FAM001",
|
|
106
|
-
individualId: "Mother",
|
|
107
|
-
maternalId: "",
|
|
108
|
-
paternalId: "",
|
|
109
|
-
sex: "FEMALE",
|
|
110
|
-
},
|
|
111
|
-
proband: false,
|
|
112
|
-
});
|
|
113
|
-
expect(result).toContainEqual({
|
|
114
|
-
index: 1,
|
|
115
|
-
person: {
|
|
116
|
-
affectedStatus: "UNAFFECTED",
|
|
117
|
-
familyId: "FAM001",
|
|
118
|
-
individualId: "Father",
|
|
119
|
-
maternalId: "",
|
|
120
|
-
paternalId: "",
|
|
121
|
-
sex: "MALE",
|
|
122
|
-
},
|
|
123
|
-
proband: false,
|
|
124
|
-
});
|
|
125
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Component, For, Show } from "solid-js";
|
|
2
|
-
import { ValueArray } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
3
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
4
|
-
import { Info } from "./record/Info";
|
|
5
|
-
import { FieldHeader } from "./FieldHeader";
|
|
6
|
-
import { Record } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
7
|
-
import { Item } from "@molgenis/vip-report-api/src/Api";
|
|
8
|
-
|
|
9
|
-
export const ConsequenceTable: Component<{
|
|
10
|
-
csqMetadata: FieldMetadata[];
|
|
11
|
-
csqValues: ValueArray;
|
|
12
|
-
record: Item<Record>;
|
|
13
|
-
}> = (props) => {
|
|
14
|
-
function getValues(index: number): ValueArray {
|
|
15
|
-
return props.csqValues[index] !== null ? (props.csqValues[index] as ValueArray) : [];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div style={{ display: "grid" }}>
|
|
20
|
-
{/* workaround for https://github.com/jgthms/bulma/issues/2572#issuecomment-523099776 */}
|
|
21
|
-
<div class="table-container">
|
|
22
|
-
<table class="table is-borderless is-narrow">
|
|
23
|
-
<tbody>
|
|
24
|
-
<For each={props.csqMetadata}>
|
|
25
|
-
{(field: FieldMetadata, index) => (
|
|
26
|
-
<Show when={!(getValues(index()).length === 0)}>
|
|
27
|
-
<tr>
|
|
28
|
-
<FieldHeader field={field} />
|
|
29
|
-
<td>
|
|
30
|
-
<Info
|
|
31
|
-
info={{ value: props.csqValues[index()], valueParent: props.csqValues, record: props.record }}
|
|
32
|
-
infoMeta={field}
|
|
33
|
-
context={{}}
|
|
34
|
-
/>
|
|
35
|
-
</td>
|
|
36
|
-
</tr>
|
|
37
|
-
</Show>
|
|
38
|
-
)}
|
|
39
|
-
</For>
|
|
40
|
-
</tbody>
|
|
41
|
-
</table>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
45
|
-
};
|
package/src/components/Error.tsx
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Component } from "solid-js";
|
|
2
|
-
|
|
3
|
-
export const Error: Component<{
|
|
4
|
-
error: unknown;
|
|
5
|
-
}> = (props) => {
|
|
6
|
-
const error = () => props.error;
|
|
7
|
-
console.error(error());
|
|
8
|
-
return <div class="notification is-danger is-light">An unexpected error occurred</div>;
|
|
9
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Component, createMemo, Show } from "solid-js";
|
|
2
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
3
|
-
import { abbreviateHeader } from "../utils/field";
|
|
4
|
-
|
|
5
|
-
export const FieldHeader: Component<{
|
|
6
|
-
field: FieldMetadata;
|
|
7
|
-
vertical?: boolean;
|
|
8
|
-
rowspan?: number;
|
|
9
|
-
colspan?: number;
|
|
10
|
-
}> = (props) => {
|
|
11
|
-
const label = createMemo(() => abbreviateHeader(props.field.label || props.field.id));
|
|
12
|
-
return (
|
|
13
|
-
<th
|
|
14
|
-
style={props.vertical ? { "writing-mode": "vertical-rl" } : undefined}
|
|
15
|
-
rowspan={props.rowspan}
|
|
16
|
-
colspan={props.colspan}
|
|
17
|
-
>
|
|
18
|
-
<Show
|
|
19
|
-
when={props.field.description && props.field.description !== label()}
|
|
20
|
-
fallback={<abbr title={props.field.label || props.field.id}>{label()}</abbr>}
|
|
21
|
-
>
|
|
22
|
-
<abbr title={props.field.description}>{label()}</abbr>
|
|
23
|
-
</Show>
|
|
24
|
-
</th>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Component, createMemo, createSignal, For, Signal } from "solid-js";
|
|
2
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
3
|
-
import { Record } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
4
|
-
import { HtsFileMetadata, Item } from "@molgenis/vip-report-api/src/Api";
|
|
5
|
-
import { ValueArray } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
6
|
-
import { Info } from "./record/Info";
|
|
7
|
-
import { FieldValue } from "./record/field/Field";
|
|
8
|
-
import { isCsqInfo } from "../utils/csqUtils";
|
|
9
|
-
import { useLocation } from "@solidjs/router";
|
|
10
|
-
|
|
11
|
-
export const InfoCollapsablePane: Component<{
|
|
12
|
-
fields: FieldMetadata[];
|
|
13
|
-
record: Item<Record>;
|
|
14
|
-
htsFileMeta: HtsFileMetadata;
|
|
15
|
-
isPossibleCompound?: boolean;
|
|
16
|
-
}> = (props) => {
|
|
17
|
-
const [collapsed, setCollapsed]: Signal<boolean> = createSignal(false);
|
|
18
|
-
|
|
19
|
-
function toggleCollapse() {
|
|
20
|
-
setCollapsed(!collapsed());
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const values = createMemo((): FieldValue[][] =>
|
|
24
|
-
props.fields.map((field) => {
|
|
25
|
-
if (field.parent) {
|
|
26
|
-
const values = (props.record.data.n[field.parent.id] || []) as ValueArray;
|
|
27
|
-
return values.map((nestedValues) => {
|
|
28
|
-
const value =
|
|
29
|
-
field.parent && field.parent.nested
|
|
30
|
-
? (nestedValues as ValueArray)[
|
|
31
|
-
field.parent.nested.items.findIndex((nestedField) => nestedField.id === field.id)
|
|
32
|
-
]
|
|
33
|
-
: null;
|
|
34
|
-
return {
|
|
35
|
-
record: props.record,
|
|
36
|
-
value: value,
|
|
37
|
-
valueParent: nestedValues,
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
throw new Error(`Nested field '${field.id}' needs to have a parent field.`);
|
|
42
|
-
}),
|
|
43
|
-
);
|
|
44
|
-
return (
|
|
45
|
-
<>
|
|
46
|
-
<td>
|
|
47
|
-
{values().length > 0 && values()[0].length > 1 && (
|
|
48
|
-
<span class="icon is-left is-clickable" onClick={toggleCollapse}>
|
|
49
|
-
{collapsed() ? <i class="fas fa-angle-up" /> : <i class="fas fa-angle-down" />}
|
|
50
|
-
</span>
|
|
51
|
-
)}
|
|
52
|
-
</td>
|
|
53
|
-
<For each={props.fields}>
|
|
54
|
-
{(field, i) => (
|
|
55
|
-
<td>
|
|
56
|
-
<For each={values()[i()]}>
|
|
57
|
-
{(value, j) => (
|
|
58
|
-
<>
|
|
59
|
-
{j() != 0 && collapsed() && <br />}
|
|
60
|
-
{(j() == 0 || collapsed()) &&
|
|
61
|
-
(isCsqInfo(field, "VIPC") ? (
|
|
62
|
-
<a href={`${useLocation().pathname}/${props.record.id}/consequences/${j()}`}>
|
|
63
|
-
<Info
|
|
64
|
-
info={value}
|
|
65
|
-
infoMeta={field}
|
|
66
|
-
context={{
|
|
67
|
-
genomeAssembly: props.htsFileMeta.genomeAssembly,
|
|
68
|
-
isPossibleCompound: props.isPossibleCompound,
|
|
69
|
-
}}
|
|
70
|
-
/>
|
|
71
|
-
</a>
|
|
72
|
-
) : (
|
|
73
|
-
<Info
|
|
74
|
-
info={value}
|
|
75
|
-
infoMeta={field}
|
|
76
|
-
context={{
|
|
77
|
-
genomeAssembly: props.htsFileMeta.genomeAssembly,
|
|
78
|
-
isPossibleCompound: props.isPossibleCompound,
|
|
79
|
-
}}
|
|
80
|
-
/>
|
|
81
|
-
))}
|
|
82
|
-
</>
|
|
83
|
-
)}
|
|
84
|
-
</For>
|
|
85
|
-
</td>
|
|
86
|
-
)}
|
|
87
|
-
</For>
|
|
88
|
-
</>
|
|
89
|
-
);
|
|
90
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Component, For } from "solid-js";
|
|
2
|
-
import { Value } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
3
|
-
import { Info } from "./record/Info";
|
|
4
|
-
import { FieldMetadata, InfoMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
5
|
-
import { FieldHeader } from "./FieldHeader";
|
|
6
|
-
import { Record } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
7
|
-
import { Item } from "@molgenis/vip-report-api/src/Api";
|
|
8
|
-
import { isCsqInfo } from "../utils/csqUtils";
|
|
9
|
-
import { useLocation } from "@solidjs/router";
|
|
10
|
-
|
|
11
|
-
function isNonEmptyNestedInfoItem(nestedInfoField: FieldMetadata, index: number, value: Value[] | Value[][]): boolean {
|
|
12
|
-
const infoField = nestedInfoField.nested?.items[index];
|
|
13
|
-
|
|
14
|
-
if (infoField === undefined) {
|
|
15
|
-
throw new Error(`Missing nested metadata for '${nestedInfoField.id}' index [${index}]`);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let empty;
|
|
19
|
-
if (nestedInfoField.number.count === 0 || nestedInfoField.number.count === 1) {
|
|
20
|
-
if (value === null) {
|
|
21
|
-
empty = true;
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
empty = true;
|
|
25
|
-
for (const subValue of value as Value[][]) {
|
|
26
|
-
if (infoField.number.count === 0 || infoField.number.count === 1) {
|
|
27
|
-
if (subValue[index] !== null) {
|
|
28
|
-
empty = false;
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
if ((subValue as Value[][])[index].length > 0) {
|
|
33
|
-
empty = false;
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return !empty;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const VariantInfoNestedTable: Component<{
|
|
43
|
-
infoValue: Value[] | Value[][];
|
|
44
|
-
infoField: InfoMetadata;
|
|
45
|
-
record: Item<Record>;
|
|
46
|
-
sample: { id: number; label: string } | null;
|
|
47
|
-
}> = (props) => {
|
|
48
|
-
return (
|
|
49
|
-
<div style={{ display: "grid" }}>
|
|
50
|
-
{/* workaround for https://github.com/jgthms/bulma/issues/2572#issuecomment-523099776 */}
|
|
51
|
-
<div class="table-container">
|
|
52
|
-
<table class="table is-narrow">
|
|
53
|
-
<thead>
|
|
54
|
-
<For each={props.infoField.nested !== undefined ? props.infoField.nested.items : []}>
|
|
55
|
-
{(infoFieldItem, i) => (
|
|
56
|
-
<>
|
|
57
|
-
{isNonEmptyNestedInfoItem(props.infoField, i(), props.infoValue) && (
|
|
58
|
-
<FieldHeader field={infoFieldItem} vertical={true} />
|
|
59
|
-
)}
|
|
60
|
-
</>
|
|
61
|
-
)}
|
|
62
|
-
</For>
|
|
63
|
-
</thead>
|
|
64
|
-
<tbody>
|
|
65
|
-
{props.infoField.number.count === 1 ? (
|
|
66
|
-
<tr>
|
|
67
|
-
<For each={props.infoValue}>
|
|
68
|
-
{(value) => (
|
|
69
|
-
<>
|
|
70
|
-
{isNonEmptyNestedInfoItem(props.infoField, -1, props.infoValue) && (
|
|
71
|
-
<td>
|
|
72
|
-
<Info info={{ value: value, record: props.record }} infoMeta={props.infoField} context={{}} />
|
|
73
|
-
</td>
|
|
74
|
-
)}
|
|
75
|
-
</>
|
|
76
|
-
)}
|
|
77
|
-
</For>
|
|
78
|
-
</tr>
|
|
79
|
-
) : (
|
|
80
|
-
<For each={props.infoValue}>
|
|
81
|
-
{(value, j) => (
|
|
82
|
-
<>
|
|
83
|
-
<tr>
|
|
84
|
-
<For each={props.infoField.nested !== undefined ? props.infoField.nested.items : []}>
|
|
85
|
-
{(infoFieldItem, i) => (
|
|
86
|
-
<>
|
|
87
|
-
{isNonEmptyNestedInfoItem(props.infoField, i(), props.infoValue) && (
|
|
88
|
-
<td>
|
|
89
|
-
{isCsqInfo(infoFieldItem, "Consequence") ? (
|
|
90
|
-
<a href={`${useLocation().pathname}/consequences/${j()}`}>
|
|
91
|
-
<Info
|
|
92
|
-
info={{
|
|
93
|
-
value: Array.isArray(value) ? value[i()] : null,
|
|
94
|
-
valueParent: value,
|
|
95
|
-
record: props.record,
|
|
96
|
-
}}
|
|
97
|
-
infoMeta={infoFieldItem}
|
|
98
|
-
context={{}}
|
|
99
|
-
/>
|
|
100
|
-
</a>
|
|
101
|
-
) : (
|
|
102
|
-
<Info
|
|
103
|
-
info={{
|
|
104
|
-
value: Array.isArray(value) ? value[i()] : null,
|
|
105
|
-
valueParent: value,
|
|
106
|
-
record: props.record,
|
|
107
|
-
}}
|
|
108
|
-
infoMeta={infoFieldItem}
|
|
109
|
-
context={{}}
|
|
110
|
-
/>
|
|
111
|
-
)}
|
|
112
|
-
</td>
|
|
113
|
-
)}
|
|
114
|
-
</>
|
|
115
|
-
)}
|
|
116
|
-
</For>
|
|
117
|
-
</tr>
|
|
118
|
-
</>
|
|
119
|
-
)}
|
|
120
|
-
</For>
|
|
121
|
-
)}
|
|
122
|
-
</tbody>
|
|
123
|
-
</table>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
);
|
|
127
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Component, createMemo, For } from "solid-js";
|
|
2
|
-
import { Record, RecordSample } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
3
|
-
import { FieldMetadataContainer } from "@molgenis/vip-report-vcf/src/VcfParser";
|
|
4
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
5
|
-
import { Format } from "./record/Format";
|
|
6
|
-
import { Item, Sample } from "@molgenis/vip-report-api/src/Api";
|
|
7
|
-
import { FieldHeader } from "./FieldHeader";
|
|
8
|
-
|
|
9
|
-
export const VariantSampleTable: Component<{
|
|
10
|
-
formatFields: FieldMetadataContainer;
|
|
11
|
-
samples: Sample[];
|
|
12
|
-
sampleValues: RecordSample[];
|
|
13
|
-
record: Item<Record>;
|
|
14
|
-
}> = (props) => {
|
|
15
|
-
const sampleFields = createMemo((): FieldMetadata[] =>
|
|
16
|
-
Object.keys(props.sampleValues[0]).map((fieldId) => props.formatFields[fieldId]),
|
|
17
|
-
);
|
|
18
|
-
return (
|
|
19
|
-
<div style={{ display: "grid" }}>
|
|
20
|
-
{/* workaround for https://github.com/jgthms/bulma/issues/2572#issuecomment-523099776 */}
|
|
21
|
-
<div class="table-container">
|
|
22
|
-
<table class="table is-narrow">
|
|
23
|
-
<thead>
|
|
24
|
-
<tr>
|
|
25
|
-
<th />
|
|
26
|
-
<For each={sampleFields()}>{(formatField) => <FieldHeader field={formatField} />}</For>
|
|
27
|
-
</tr>
|
|
28
|
-
</thead>
|
|
29
|
-
<tbody>
|
|
30
|
-
<For each={props.sampleValues}>
|
|
31
|
-
{(sampleValue, i) => (
|
|
32
|
-
<tr>
|
|
33
|
-
<th>{props.samples[i()].person.individualId}</th>
|
|
34
|
-
<For each={sampleFields()}>
|
|
35
|
-
{(formatField) => (
|
|
36
|
-
<td>
|
|
37
|
-
<Format
|
|
38
|
-
format={sampleValue[formatField.id]}
|
|
39
|
-
formatMetadata={formatField}
|
|
40
|
-
record={props.record}
|
|
41
|
-
isAbbreviate={false}
|
|
42
|
-
allelicBalance={
|
|
43
|
-
props.record.data.s[props.samples[i()].index]["VIAB"] as number | undefined | null
|
|
44
|
-
}
|
|
45
|
-
readDepth={props.record.data.s[props.samples[i()].index]["DP"] as number | undefined | null}
|
|
46
|
-
/>
|
|
47
|
-
</td>
|
|
48
|
-
)}
|
|
49
|
-
</For>
|
|
50
|
-
</tr>
|
|
51
|
-
)}
|
|
52
|
-
</For>
|
|
53
|
-
</tbody>
|
|
54
|
-
</table>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { Genotype, Metadata, Record } from "@molgenis/vip-report-vcf/src/Vcf";
|
|
2
|
-
import { Ref } from "./record/Ref";
|
|
3
|
-
import { Chrom } from "./record/Chrom";
|
|
4
|
-
import { Pos } from "./record/Pos";
|
|
5
|
-
import { HtsFileMetadata, Item, Sample } from "@molgenis/vip-report-api/src/Api";
|
|
6
|
-
import { GenotypeField } from "./record/format/GenotypeField";
|
|
7
|
-
import { InfoCollapsablePane } from "./InfoCollapsablePane";
|
|
8
|
-
import { Component, createMemo, createSignal, For, onMount, Show } from "solid-js";
|
|
9
|
-
import { FieldMetadata } from "@molgenis/vip-report-vcf/src/MetadataParser";
|
|
10
|
-
import { FieldHeader } from "./FieldHeader";
|
|
11
|
-
import { Abbr } from "./Abbr";
|
|
12
|
-
import { abbreviateHeader } from "../utils/field";
|
|
13
|
-
import {
|
|
14
|
-
getSampleAffectedStatusLabel,
|
|
15
|
-
getSampleFamilyMembersWithoutParents,
|
|
16
|
-
getSampleFather,
|
|
17
|
-
getSampleLabel,
|
|
18
|
-
getSampleMother,
|
|
19
|
-
getSampleSexLabel,
|
|
20
|
-
} from "../utils/sample";
|
|
21
|
-
|
|
22
|
-
export const VariantsSampleTable: Component<{
|
|
23
|
-
item: Item<Sample>;
|
|
24
|
-
pedigreeSamples: Item<Sample>[];
|
|
25
|
-
records: Item<Record>[];
|
|
26
|
-
recordsMetadata: Metadata;
|
|
27
|
-
nestedFields: FieldMetadata[];
|
|
28
|
-
htsFileMeta: HtsFileMetadata;
|
|
29
|
-
}> = (props) => {
|
|
30
|
-
const samples = createMemo(() => [props.item.data, ...props.pedigreeSamples.map((item) => item.data)]);
|
|
31
|
-
|
|
32
|
-
const [proband, setProband] = createSignal<Sample | undefined>();
|
|
33
|
-
const [father, setFather] = createSignal<Sample | undefined>();
|
|
34
|
-
const [mother, setMother] = createSignal<Sample | undefined>();
|
|
35
|
-
const [otherFamilyMembers, setOtherFamilyMembers] = createSignal<Sample[]>([]);
|
|
36
|
-
|
|
37
|
-
onMount(() => {
|
|
38
|
-
setProband(props.item.data);
|
|
39
|
-
setMother(getSampleMother(proband() as Sample, samples()));
|
|
40
|
-
setFather(getSampleFather(proband() as Sample, samples()));
|
|
41
|
-
setOtherFamilyMembers(getSampleFamilyMembersWithoutParents(proband() as Sample, samples()));
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
function getSampleHeaderDescription(sample: Sample): string {
|
|
45
|
-
return `${getSampleLabel(sample)}: ${getSampleSexLabel(sample)}, ${getSampleAffectedStatusLabel(sample)}`;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<div style={{ display: "grid" }}>
|
|
50
|
-
{/* workaround for https://github.com/jgthms/bulma/issues/2572#issuecomment-523099776 */}
|
|
51
|
-
<div class="table-container">
|
|
52
|
-
<table class="table is-narrow">
|
|
53
|
-
<thead>
|
|
54
|
-
<tr>
|
|
55
|
-
<th>Position</th>
|
|
56
|
-
<th>Reference</th>
|
|
57
|
-
<Show when={proband()} keyed>
|
|
58
|
-
{(proband) => (
|
|
59
|
-
<th>
|
|
60
|
-
<Abbr title={getSampleHeaderDescription(proband)} value="Proband" />
|
|
61
|
-
</th>
|
|
62
|
-
)}
|
|
63
|
-
</Show>
|
|
64
|
-
<Show when={mother()} keyed>
|
|
65
|
-
{(mother) => (
|
|
66
|
-
<th>
|
|
67
|
-
<Abbr title={getSampleHeaderDescription(mother)} value="Mother" />
|
|
68
|
-
</th>
|
|
69
|
-
)}
|
|
70
|
-
</Show>
|
|
71
|
-
<Show when={father()} keyed>
|
|
72
|
-
{(father) => (
|
|
73
|
-
<th>
|
|
74
|
-
<Abbr title={getSampleHeaderDescription(father)} value="Father" />
|
|
75
|
-
</th>
|
|
76
|
-
)}
|
|
77
|
-
</Show>
|
|
78
|
-
<For each={otherFamilyMembers()}>
|
|
79
|
-
{(sample: Sample) => (
|
|
80
|
-
<th>
|
|
81
|
-
<Abbr title={getSampleHeaderDescription(sample)} value={abbreviateHeader(getSampleLabel(sample))} />
|
|
82
|
-
</th>
|
|
83
|
-
)}
|
|
84
|
-
</For>
|
|
85
|
-
{/* column containing collapse/expand icon */}
|
|
86
|
-
<th />
|
|
87
|
-
<For each={props.nestedFields}>{(field) => <FieldHeader field={field} />}</For>
|
|
88
|
-
</tr>
|
|
89
|
-
</thead>
|
|
90
|
-
<tbody>
|
|
91
|
-
<For each={props.records}>
|
|
92
|
-
{(record) => (
|
|
93
|
-
<tr>
|
|
94
|
-
<td>
|
|
95
|
-
<a href={`/samples/${props.item.id}/variants/${record.id}`}>
|
|
96
|
-
<Chrom value={record.data.c} />
|
|
97
|
-
<span>:</span>
|
|
98
|
-
<Pos value={record.data.p} />
|
|
99
|
-
</a>
|
|
100
|
-
</td>
|
|
101
|
-
<td>
|
|
102
|
-
<Ref value={record.data.r} isAbbreviate={true} />
|
|
103
|
-
</td>
|
|
104
|
-
<Show when={proband()} keyed>
|
|
105
|
-
{(proband) => (
|
|
106
|
-
<td>
|
|
107
|
-
<GenotypeField
|
|
108
|
-
genotype={record.data.s[proband.index]["GT"] as Genotype}
|
|
109
|
-
refAllele={record.data.r}
|
|
110
|
-
altAlleles={record.data.a}
|
|
111
|
-
isAbbreviate={true}
|
|
112
|
-
allelicBalance={record.data.s[proband.index]["VIAB"] as number | undefined | null}
|
|
113
|
-
readDepth={record.data.s[proband.index]["DP"] as number | undefined}
|
|
114
|
-
/>
|
|
115
|
-
</td>
|
|
116
|
-
)}
|
|
117
|
-
</Show>
|
|
118
|
-
<Show when={mother()} keyed>
|
|
119
|
-
{(mother) => (
|
|
120
|
-
<td>
|
|
121
|
-
<GenotypeField
|
|
122
|
-
genotype={record.data.s[mother.index]["GT"] as Genotype}
|
|
123
|
-
refAllele={record.data.r}
|
|
124
|
-
altAlleles={record.data.a}
|
|
125
|
-
isAbbreviate={true}
|
|
126
|
-
allelicBalance={record.data.s[mother.index]["VIAB"] as number | undefined | null}
|
|
127
|
-
readDepth={record.data.s[mother.index]["DP"] as number | undefined}
|
|
128
|
-
/>
|
|
129
|
-
</td>
|
|
130
|
-
)}
|
|
131
|
-
</Show>
|
|
132
|
-
<Show when={father()} keyed>
|
|
133
|
-
{(father) => (
|
|
134
|
-
<td>
|
|
135
|
-
<GenotypeField
|
|
136
|
-
genotype={record.data.s[father.index]["GT"] as Genotype}
|
|
137
|
-
refAllele={record.data.r}
|
|
138
|
-
altAlleles={record.data.a}
|
|
139
|
-
isAbbreviate={true}
|
|
140
|
-
allelicBalance={record.data.s[father.index]["VIAB"] as number | undefined | null}
|
|
141
|
-
readDepth={record.data.s[father.index]["DP"] as number | undefined}
|
|
142
|
-
/>
|
|
143
|
-
</td>
|
|
144
|
-
)}
|
|
145
|
-
</Show>
|
|
146
|
-
<For each={otherFamilyMembers()}>
|
|
147
|
-
{(sample: Sample) => (
|
|
148
|
-
<>
|
|
149
|
-
<td>
|
|
150
|
-
<GenotypeField
|
|
151
|
-
genotype={record.data.s[sample.index]["GT"] as Genotype}
|
|
152
|
-
refAllele={record.data.r}
|
|
153
|
-
altAlleles={record.data.a}
|
|
154
|
-
isAbbreviate={true}
|
|
155
|
-
allelicBalance={record.data.s[sample.index]["VIAB"] as number | undefined | null}
|
|
156
|
-
readDepth={record.data.s[sample.index]["DP"] as number | undefined}
|
|
157
|
-
/>
|
|
158
|
-
</td>
|
|
159
|
-
</>
|
|
160
|
-
)}
|
|
161
|
-
</For>
|
|
162
|
-
<Show when={proband()} keyed>
|
|
163
|
-
{(proband) => (
|
|
164
|
-
<InfoCollapsablePane
|
|
165
|
-
fields={props.nestedFields}
|
|
166
|
-
record={record}
|
|
167
|
-
htsFileMeta={props.htsFileMeta}
|
|
168
|
-
isPossibleCompound={
|
|
169
|
-
record.data.s[proband.index]["VIC"] !== null &&
|
|
170
|
-
record.data.s[proband.index]["VIC"] !== undefined
|
|
171
|
-
}
|
|
172
|
-
/>
|
|
173
|
-
)}
|
|
174
|
-
</Show>
|
|
175
|
-
</tr>
|
|
176
|
-
)}
|
|
177
|
-
</For>
|
|
178
|
-
</tbody>
|
|
179
|
-
</table>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
);
|
|
183
|
-
};
|