@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,409 +1,422 @@
|
|
|
1
|
-
import { ApiClient, ReportData } from "@molgenis/vip-report-api/src/ApiClient";
|
|
2
|
-
import { parseVcf } from "@molgenis/vip-report-vcf/src/VcfParser";
|
|
3
1
|
import {
|
|
4
2
|
Api,
|
|
3
|
+
ApiClient,
|
|
5
4
|
AppMetadata,
|
|
6
5
|
Cram,
|
|
7
6
|
DecisionTree,
|
|
8
7
|
HtsFileMetadata,
|
|
9
8
|
Item,
|
|
9
|
+
Json,
|
|
10
10
|
Metadata,
|
|
11
11
|
PagedItems,
|
|
12
12
|
Params,
|
|
13
13
|
Phenotype,
|
|
14
|
+
ReportData,
|
|
14
15
|
Sample,
|
|
15
|
-
} from "@molgenis/vip-report-api
|
|
16
|
+
} from "@molgenis/vip-report-api";
|
|
17
|
+
import { parseVcf, VcfMetadata, VcfRecord } from "@molgenis/vip-report-vcf";
|
|
18
|
+
import configCram from "./config_cram.json";
|
|
19
|
+
import configVcf from "./config_vcf.json";
|
|
16
20
|
import { samples1, samples100 } from "./static";
|
|
17
21
|
import {
|
|
18
|
-
cram as cramGRCh37,
|
|
19
|
-
crai as craiGRCh37,
|
|
20
22
|
decisionTree as decisionTreeGRCh37,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
fetchCrai as fetchCraiGRCh37,
|
|
24
|
+
fetchCram as fetchCramGRCh37,
|
|
25
|
+
fetchFastaGz as fetchFastaGzGRCh37,
|
|
26
|
+
fetchGenesGz as fetchGenesGzGRCh37,
|
|
27
|
+
fetchVcfFamily as fetchVcfFamilyGRCh37,
|
|
23
28
|
samplesFamily as samplesFamilyGRCh37,
|
|
29
|
+
sampleTree as sampleTreeGRCh37,
|
|
24
30
|
vcfMeta as vcfMetaGRCh37,
|
|
25
|
-
vcfFamily as vcfFamilyGRCh37,
|
|
26
|
-
vcfNoVep as vcfNoVepGRCh37,
|
|
27
|
-
vcfSamples0 as vcfSamples0GRCh37,
|
|
28
|
-
vcfSamples1 as vcfSamples1GRCh37,
|
|
29
|
-
vcfSamples100 as vcfSamples100GRCh37,
|
|
30
|
-
samplesFamilyDuoPlusSister as samplesFamilyDuoPlusSisterGRCh37,
|
|
31
31
|
} from "./GRCh37/static";
|
|
32
32
|
import {
|
|
33
|
-
cram as cramGRCh38,
|
|
34
|
-
crai as craiGRCh38,
|
|
35
33
|
decisionTree as decisionTreeGRCh38,
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
decisionTreeStr as decisionTreeStrGRCh38,
|
|
35
|
+
fetchCrai as fetchCraiGRCh38,
|
|
36
|
+
fetchCram as fetchCramGRCh38,
|
|
37
|
+
fetchFastaGz as fetchFastaGzGRCh38,
|
|
38
|
+
fetchGenesGz as fetchGenesGzGRCh38,
|
|
39
|
+
fetchStrCrai as fetchStrCraiGRCh38,
|
|
40
|
+
fetchStrCram as fetchStrCramGRCh38,
|
|
41
|
+
fetchVcfFamily as fetchVcfFamilyGRCh38,
|
|
42
|
+
fetchVcfNoVep as fetchVcfNoVepGRCh38,
|
|
43
|
+
fetchVcfSamples0 as fetchVcfSamples0GRCh38,
|
|
44
|
+
fetchVcfSamples1 as fetchVcfSamples1GRCh38,
|
|
45
|
+
fetchVcfSamples100 as fetchVcfSamples100GRCh38,
|
|
46
|
+
fetchVcfStr as fetchVcfStrGRCh38,
|
|
38
47
|
samplesFamily as samplesFamilyGRCh38,
|
|
48
|
+
samplesStr,
|
|
49
|
+
sampleTree as sampleTreeGRCh38,
|
|
39
50
|
vcfMeta as vcfMetaGRCh38,
|
|
40
|
-
vcfFamily as vcfFamilyGRCh38,
|
|
41
|
-
vcfNoVep as vcfNoVepGRCh38,
|
|
42
|
-
vcfSamples0 as vcfSamples0GRCh38,
|
|
43
|
-
vcfSamples1 as vcfSamples1GRCh38,
|
|
44
|
-
vcfSamples100 as vcfSamples100GRCh38,
|
|
45
51
|
} from "./GRCh38/static";
|
|
46
|
-
import
|
|
52
|
+
import AsyncLock from "async-lock";
|
|
53
|
+
|
|
54
|
+
const lock = new AsyncLock();
|
|
47
55
|
|
|
48
56
|
/**
|
|
49
57
|
* API client that uses mocked data as data source.
|
|
50
58
|
*/
|
|
51
59
|
export class MockApiClient implements Api {
|
|
52
|
-
private
|
|
53
|
-
|
|
60
|
+
private static dataSetIds = [
|
|
61
|
+
"GRCh37 Family",
|
|
62
|
+
"GRCh38 Family",
|
|
63
|
+
"GRCh38 Family no VEP",
|
|
64
|
+
"GRCh38 Samples 0",
|
|
65
|
+
"GRCh38 Samples 1",
|
|
66
|
+
"GRCh38 Samples 100",
|
|
67
|
+
"GRCh38 Samples 1 STR",
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
private dataSetId: string;
|
|
71
|
+
private apiClient: Api | undefined;
|
|
54
72
|
|
|
55
73
|
constructor() {
|
|
56
|
-
this.
|
|
57
|
-
|
|
74
|
+
this.dataSetId = MockApiClient.dataSetIds[0]!;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async getConfig(): Promise<Json | null> {
|
|
78
|
+
const apiClient = await this.getApiClient();
|
|
79
|
+
return apiClient.getConfig();
|
|
58
80
|
}
|
|
59
81
|
|
|
60
|
-
getFastaGz(contig: string, pos: number): Promise<Uint8Array | null> {
|
|
61
|
-
|
|
82
|
+
async getFastaGz(contig: string, pos: number): Promise<Uint8Array | null> {
|
|
83
|
+
const apiClient = await this.getApiClient();
|
|
84
|
+
return apiClient.getFastaGz(contig, pos);
|
|
62
85
|
}
|
|
63
86
|
|
|
64
|
-
getGenesGz(): Promise<Uint8Array | null> {
|
|
65
|
-
|
|
87
|
+
async getGenesGz(): Promise<Uint8Array | null> {
|
|
88
|
+
const apiClient = await this.getApiClient();
|
|
89
|
+
return apiClient.getGenesGz();
|
|
66
90
|
}
|
|
67
91
|
|
|
68
|
-
getCram(sampleId: string): Promise<Cram | null> {
|
|
69
|
-
|
|
92
|
+
async getCram(sampleId: string): Promise<Cram | null> {
|
|
93
|
+
const apiClient = await this.getApiClient();
|
|
94
|
+
return apiClient.getCram(sampleId);
|
|
70
95
|
}
|
|
71
96
|
|
|
72
|
-
getDecisionTree(): Promise<DecisionTree | null> {
|
|
73
|
-
|
|
97
|
+
async getDecisionTree(): Promise<DecisionTree | null> {
|
|
98
|
+
const apiClient = await this.getApiClient();
|
|
99
|
+
return apiClient.getDecisionTree();
|
|
74
100
|
}
|
|
75
101
|
|
|
76
|
-
|
|
77
|
-
|
|
102
|
+
async getSampleTree(): Promise<DecisionTree | null> {
|
|
103
|
+
const apiClient = await this.getApiClient();
|
|
104
|
+
return apiClient.getSampleTree();
|
|
78
105
|
}
|
|
79
106
|
|
|
80
|
-
|
|
81
|
-
|
|
107
|
+
async getHtsFileMetadata(): Promise<HtsFileMetadata> {
|
|
108
|
+
const apiClient = await this.getApiClient();
|
|
109
|
+
return apiClient.getHtsFileMetadata();
|
|
82
110
|
}
|
|
83
111
|
|
|
84
|
-
|
|
85
|
-
|
|
112
|
+
async getAppMetadata(): Promise<AppMetadata> {
|
|
113
|
+
const apiClient = await this.getApiClient();
|
|
114
|
+
return apiClient.getAppMetadata();
|
|
86
115
|
}
|
|
87
116
|
|
|
88
|
-
|
|
89
|
-
|
|
117
|
+
async getPhenotypes(params: Params): Promise<PagedItems<Phenotype>> {
|
|
118
|
+
const apiClient = await this.getApiClient();
|
|
119
|
+
return apiClient.getPhenotypes(params);
|
|
90
120
|
}
|
|
91
121
|
|
|
92
|
-
|
|
93
|
-
|
|
122
|
+
async getRecordById(id: number): Promise<Item<VcfRecord>> {
|
|
123
|
+
const apiClient = await this.getApiClient();
|
|
124
|
+
return apiClient.getRecordById(id);
|
|
94
125
|
}
|
|
95
126
|
|
|
96
|
-
|
|
97
|
-
|
|
127
|
+
async getRecords(params: Params): Promise<PagedItems<VcfRecord>> {
|
|
128
|
+
const apiClient = await this.getApiClient();
|
|
129
|
+
return apiClient.getRecords(params);
|
|
98
130
|
}
|
|
99
131
|
|
|
100
|
-
|
|
101
|
-
|
|
132
|
+
async getRecordsMeta(): Promise<VcfMetadata> {
|
|
133
|
+
const apiClient = await this.getApiClient();
|
|
134
|
+
return apiClient.getRecordsMeta();
|
|
102
135
|
}
|
|
103
136
|
|
|
104
|
-
|
|
105
|
-
|
|
137
|
+
async getSampleById(id: number): Promise<Item<Sample>> {
|
|
138
|
+
const apiClient = await this.getApiClient();
|
|
139
|
+
return apiClient.getSampleById(id);
|
|
106
140
|
}
|
|
107
141
|
|
|
108
|
-
|
|
109
|
-
|
|
142
|
+
async getSamples(params: Params): Promise<PagedItems<Sample>> {
|
|
143
|
+
const apiClient = await this.getApiClient();
|
|
144
|
+
return apiClient.getSamples(params);
|
|
110
145
|
}
|
|
111
146
|
|
|
112
147
|
getDatasetIds(): string[] {
|
|
113
|
-
return
|
|
148
|
+
return MockApiClient.dataSetIds;
|
|
114
149
|
}
|
|
115
150
|
|
|
116
151
|
selectDataset(id: string): void {
|
|
117
|
-
this.
|
|
152
|
+
this.dataSetId = id;
|
|
153
|
+
this.apiClient = undefined;
|
|
118
154
|
}
|
|
119
155
|
|
|
120
|
-
private
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
156
|
+
private async getApiClient(): Promise<Api> {
|
|
157
|
+
if (this.apiClient === undefined) {
|
|
158
|
+
await lock.acquire("apiClient", async () => {
|
|
159
|
+
if (this.apiClient === undefined) {
|
|
160
|
+
this.apiClient = await createApiClient(this.dataSetId);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (this.apiClient === undefined) throw new Error();
|
|
166
|
+
return this.apiClient;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
async function createApiClient(id: string): Promise<Api> {
|
|
171
|
+
let reportData: ReportData;
|
|
172
|
+
switch (id) {
|
|
173
|
+
case "GRCh37 Family":
|
|
174
|
+
reportData = await fetchReportDataGRCh37Family();
|
|
175
|
+
break;
|
|
176
|
+
case "GRCh38 Family":
|
|
177
|
+
reportData = await fetchReportDataGRCh38Family();
|
|
178
|
+
break;
|
|
179
|
+
case "GRCh38 Family no VEP":
|
|
180
|
+
reportData = await fetchReportDataGRCh38FamilyNoVep();
|
|
181
|
+
break;
|
|
182
|
+
case "GRCh38 Samples 0":
|
|
183
|
+
reportData = await fetchReportDataGRCh38NoSample();
|
|
184
|
+
break;
|
|
185
|
+
case "GRCh38 Samples 1":
|
|
186
|
+
reportData = await fetchReportDataGRCh38Data1Sample();
|
|
187
|
+
break;
|
|
188
|
+
case "GRCh38 Samples 100":
|
|
189
|
+
reportData = await fetchReportDataGRCh38Data100Samples();
|
|
190
|
+
break;
|
|
191
|
+
case "GRCh38 Samples 1 STR":
|
|
192
|
+
reportData = await fetchReportDataGRCh38Str();
|
|
193
|
+
break;
|
|
194
|
+
default:
|
|
195
|
+
throw new Error(`unknown dataset id '${id}'`);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const vcf = parseVcf(new TextDecoder().decode(reportData.binary.vcf), reportData.vcfMeta);
|
|
199
|
+
reportData.metadata.records = vcf.metadata;
|
|
200
|
+
reportData.data.records = vcf.data;
|
|
201
|
+
|
|
202
|
+
return new ApiClient(reportData);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
async function fetchReportDataGRCh37Family(): Promise<ReportData> {
|
|
206
|
+
return {
|
|
207
|
+
config: configVcf as unknown as Json,
|
|
208
|
+
metadata: {
|
|
209
|
+
app: {
|
|
210
|
+
name: "vcf-report",
|
|
211
|
+
version: "0.0.8",
|
|
212
|
+
args: "-i testdata_b37_vip.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
145
213
|
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const mockReportDataNoVep: ReportData = {
|
|
151
|
-
metadata: {
|
|
152
|
-
app: {
|
|
153
|
-
name: "vcf-report",
|
|
154
|
-
version: "0.0.8",
|
|
155
|
-
args: "-i testdata_b37.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
156
|
-
},
|
|
157
|
-
htsFile: {
|
|
158
|
-
uri: "testdata_b37.vcf",
|
|
159
|
-
htsFormat: "VCF",
|
|
160
|
-
genomeAssembly: "GRCh37",
|
|
161
|
-
},
|
|
162
|
-
} as Metadata,
|
|
163
|
-
data: samplesFamilyDuoPlusSisterGRCh37,
|
|
164
|
-
binary: {
|
|
165
|
-
vcf: vcfNoVepGRCh37,
|
|
166
|
-
fastaGz: fastaGzGRCh37,
|
|
167
|
-
genesGz: genesGzGRCh37,
|
|
168
|
-
cram: {
|
|
169
|
-
Patient: {
|
|
170
|
-
cram: cramGRCh37,
|
|
171
|
-
crai: craiGRCh37,
|
|
172
|
-
},
|
|
173
|
-
},
|
|
214
|
+
htsFile: {
|
|
215
|
+
uri: "/path/to/testdata_b37_vip.vcf",
|
|
216
|
+
htsFormat: "VCF",
|
|
217
|
+
genomeAssembly: "GRCh37",
|
|
174
218
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
},
|
|
186
|
-
htsFile: {
|
|
187
|
-
uri: "testdata_b37_1Sample.vcf",
|
|
188
|
-
htsFormat: "VCF",
|
|
189
|
-
genomeAssembly: "GRCh37",
|
|
190
|
-
},
|
|
191
|
-
} as Metadata,
|
|
192
|
-
data: samples1,
|
|
193
|
-
binary: {
|
|
194
|
-
vcf: vcfSamples1GRCh37,
|
|
195
|
-
fastaGz: fastaGzGRCh37,
|
|
196
|
-
genesGz: genesGzGRCh37,
|
|
197
|
-
cram: {
|
|
198
|
-
SAMPLE1: {
|
|
199
|
-
cram: cramGRCh37,
|
|
200
|
-
crai: craiGRCh37,
|
|
201
|
-
},
|
|
219
|
+
} as Metadata,
|
|
220
|
+
data: samplesFamilyGRCh37,
|
|
221
|
+
binary: {
|
|
222
|
+
vcf: await fetchVcfFamilyGRCh37(),
|
|
223
|
+
fastaGz: await fetchFastaGzGRCh37(),
|
|
224
|
+
genesGz: await fetchGenesGzGRCh37(),
|
|
225
|
+
cram: {
|
|
226
|
+
Patient: {
|
|
227
|
+
cram: await fetchCramGRCh37(),
|
|
228
|
+
crai: await fetchCraiGRCh37(),
|
|
202
229
|
},
|
|
203
230
|
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
} as Metadata,
|
|
221
|
-
data: samples100,
|
|
222
|
-
binary: {
|
|
223
|
-
vcf: vcfSamples100GRCh37,
|
|
224
|
-
fastaGz: fastaGzGRCh37,
|
|
225
|
-
genesGz: genesGzGRCh37,
|
|
231
|
+
},
|
|
232
|
+
decisionTree: decisionTreeGRCh37,
|
|
233
|
+
sampleTree: sampleTreeGRCh37,
|
|
234
|
+
vcfMeta: vcfMetaGRCh37,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
async function fetchReportDataGRCh38Family(): Promise<ReportData> {
|
|
239
|
+
return {
|
|
240
|
+
config: configVcf as unknown as Json,
|
|
241
|
+
metadata: {
|
|
242
|
+
app: {
|
|
243
|
+
name: "vcf-report",
|
|
244
|
+
version: "0.0.8",
|
|
245
|
+
args: "-i testdata_b38_vip.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
226
246
|
},
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const mockReportDataNoSample: ReportData = {
|
|
232
|
-
metadata: {
|
|
233
|
-
app: {
|
|
234
|
-
name: "vcf-report",
|
|
235
|
-
version: "0.0.8",
|
|
236
|
-
args: "-i testdata_b37_1NoSamples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
237
|
-
},
|
|
238
|
-
htsFile: {
|
|
239
|
-
uri: "testdata_b37_NoSamples.vcf",
|
|
240
|
-
htsFormat: "VCF",
|
|
241
|
-
genomeAssembly: "GRCh37",
|
|
242
|
-
},
|
|
243
|
-
} as Metadata,
|
|
244
|
-
data: { samples: [], phenotypes: [] },
|
|
245
|
-
binary: {
|
|
246
|
-
vcf: vcfSamples0GRCh37,
|
|
247
|
-
fastaGz: fastaGzGRCh37,
|
|
248
|
-
genesGz: genesGzGRCh37,
|
|
247
|
+
htsFile: {
|
|
248
|
+
uri: "testdata_b38_vip.vcf",
|
|
249
|
+
htsFormat: "VCF",
|
|
250
|
+
genomeAssembly: "GRCh38",
|
|
249
251
|
},
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
htsFile: {
|
|
262
|
-
uri: "testdata_b38_vip.vcf",
|
|
263
|
-
htsFormat: "VCF",
|
|
264
|
-
genomeAssembly: "GRCh38",
|
|
265
|
-
},
|
|
266
|
-
} as Metadata,
|
|
267
|
-
data: samplesFamilyGRCh38,
|
|
268
|
-
binary: {
|
|
269
|
-
vcf: vcfFamilyGRCh38,
|
|
270
|
-
fastaGz: fastaGzGRCh38,
|
|
271
|
-
genesGz: genesGzGRCh38,
|
|
272
|
-
cram: {
|
|
273
|
-
Patient: {
|
|
274
|
-
cram: cramGRCh38,
|
|
275
|
-
crai: craiGRCh38,
|
|
276
|
-
},
|
|
252
|
+
} as Metadata,
|
|
253
|
+
data: samplesFamilyGRCh38,
|
|
254
|
+
binary: {
|
|
255
|
+
vcf: await fetchVcfFamilyGRCh38(),
|
|
256
|
+
fastaGz: await fetchFastaGzGRCh38(),
|
|
257
|
+
genesGz: await fetchGenesGzGRCh38(),
|
|
258
|
+
cram: {
|
|
259
|
+
Patient: {
|
|
260
|
+
cram: await fetchCramGRCh38(),
|
|
261
|
+
crai: await fetchCraiGRCh38(),
|
|
277
262
|
},
|
|
278
263
|
},
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
},
|
|
295
|
-
} as Metadata,
|
|
296
|
-
data: samplesFamilyGRCh38,
|
|
297
|
-
binary: {
|
|
298
|
-
vcf: vcfNoVepGRCh38,
|
|
299
|
-
fastaGz: fastaGzGRCh38,
|
|
300
|
-
genesGz: genesGzGRCh38,
|
|
301
|
-
cram: {
|
|
302
|
-
Patient: {
|
|
303
|
-
cram: cramGRCh38,
|
|
304
|
-
crai: craiGRCh38,
|
|
305
|
-
},
|
|
306
|
-
},
|
|
264
|
+
},
|
|
265
|
+
decisionTree: decisionTreeGRCh38,
|
|
266
|
+
sampleTree: sampleTreeGRCh38,
|
|
267
|
+
vcfMeta: vcfMetaGRCh38,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
async function fetchReportDataGRCh38FamilyNoVep() {
|
|
272
|
+
return {
|
|
273
|
+
config: configVcf as unknown as Json,
|
|
274
|
+
metadata: {
|
|
275
|
+
app: {
|
|
276
|
+
name: "vcf-report",
|
|
277
|
+
version: "0.0.8",
|
|
278
|
+
args: "-i testdata_b38.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
307
279
|
},
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
const mockReportData1SampleGRCh38: ReportData = {
|
|
313
|
-
metadata: {
|
|
314
|
-
app: {
|
|
315
|
-
name: "vcf-report",
|
|
316
|
-
version: "0.0.8",
|
|
317
|
-
args: "-i testdata_b38_1Sample.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
318
|
-
},
|
|
319
|
-
htsFile: {
|
|
320
|
-
uri: "testdata_b38_1Sample.vcf",
|
|
321
|
-
htsFormat: "VCF",
|
|
322
|
-
genomeAssembly: "GRCh38",
|
|
323
|
-
},
|
|
324
|
-
} as Metadata,
|
|
325
|
-
data: samples1,
|
|
326
|
-
binary: {
|
|
327
|
-
vcf: vcfSamples1GRCh38,
|
|
328
|
-
fastaGz: fastaGzGRCh38,
|
|
329
|
-
genesGz: genesGzGRCh38,
|
|
330
|
-
cram: {
|
|
331
|
-
SAMPLE1: {
|
|
332
|
-
cram: cramGRCh38,
|
|
333
|
-
crai: craiGRCh38,
|
|
334
|
-
},
|
|
335
|
-
},
|
|
280
|
+
htsFile: {
|
|
281
|
+
uri: "testdata_b38.vcf",
|
|
282
|
+
htsFormat: "VCF",
|
|
283
|
+
genomeAssembly: "GRCh38",
|
|
336
284
|
},
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
},
|
|
348
|
-
htsFile: {
|
|
349
|
-
uri: "testdata_b38_100Samples.vcf",
|
|
350
|
-
htsFormat: "VCF",
|
|
351
|
-
genomeAssembly: "GRCh38",
|
|
285
|
+
} as Metadata,
|
|
286
|
+
data: samplesFamilyGRCh38,
|
|
287
|
+
binary: {
|
|
288
|
+
vcf: await fetchVcfNoVepGRCh38(),
|
|
289
|
+
fastaGz: await fetchFastaGzGRCh38(),
|
|
290
|
+
genesGz: await fetchGenesGzGRCh38(),
|
|
291
|
+
cram: {
|
|
292
|
+
Patient: {
|
|
293
|
+
cram: await fetchCramGRCh38(),
|
|
294
|
+
crai: await fetchCraiGRCh38(),
|
|
352
295
|
},
|
|
353
|
-
} as Metadata,
|
|
354
|
-
data: samples100,
|
|
355
|
-
binary: {
|
|
356
|
-
vcf: vcfSamples100GRCh38,
|
|
357
|
-
fastaGz: fastaGzGRCh38,
|
|
358
|
-
genesGz: genesGzGRCh38,
|
|
359
296
|
},
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
297
|
+
},
|
|
298
|
+
decisionTree: decisionTreeGRCh38,
|
|
299
|
+
sampleTree: sampleTreeGRCh38,
|
|
300
|
+
vcfMeta: vcfMetaGRCh38,
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
async function fetchReportDataGRCh38Data1Sample(): Promise<ReportData> {
|
|
305
|
+
return {
|
|
306
|
+
config: configVcf as unknown as Json,
|
|
307
|
+
metadata: {
|
|
308
|
+
app: {
|
|
309
|
+
name: "vcf-report",
|
|
310
|
+
version: "0.0.8",
|
|
311
|
+
args: "-i testdata_b38_1Sample.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
312
|
+
},
|
|
313
|
+
htsFile: {
|
|
314
|
+
uri: "testdata_b38_1Sample.vcf",
|
|
315
|
+
htsFormat: "VCF",
|
|
316
|
+
genomeAssembly: "GRCh38",
|
|
317
|
+
},
|
|
318
|
+
} as Metadata,
|
|
319
|
+
data: samples1,
|
|
320
|
+
binary: {
|
|
321
|
+
vcf: await fetchVcfSamples1GRCh38(),
|
|
322
|
+
fastaGz: await fetchFastaGzGRCh38(),
|
|
323
|
+
genesGz: await fetchGenesGzGRCh38(),
|
|
324
|
+
cram: {
|
|
325
|
+
SAMPLE1: {
|
|
326
|
+
cram: await fetchCramGRCh38(),
|
|
327
|
+
crai: await fetchCraiGRCh38(),
|
|
375
328
|
},
|
|
376
|
-
} as Metadata,
|
|
377
|
-
data: { samples: [], phenotypes: [] },
|
|
378
|
-
binary: {
|
|
379
|
-
vcf: vcfSamples0GRCh38,
|
|
380
|
-
fastaGz: fastaGzGRCh38,
|
|
381
|
-
genesGz: genesGzGRCh38,
|
|
382
329
|
},
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
datasets["GRCh37 Family no VEP"] = mockReportDataNoVep;
|
|
390
|
-
datasets["GRCh37 Samples 0"] = mockReportDataNoSample;
|
|
391
|
-
datasets["GRCh37 Samples 1"] = mockReportData1Sample;
|
|
392
|
-
datasets["GRCh37 Samples 100"] = mockReportData100Samples;
|
|
393
|
-
datasets["GRCh38 Family"] = mockReportDataFamilyGRCh38;
|
|
394
|
-
datasets["GRCh38 Family no VEP"] = mockReportDataNoVepGRCh38;
|
|
395
|
-
datasets["GRCh38 Samples 0"] = mockReportDataNoSampleGRCh38;
|
|
396
|
-
datasets["GRCh38 Samples 1"] = mockReportData1SampleGRCh38;
|
|
397
|
-
datasets["GRCh38 Samples 100"] = mockReportData100SamplesGRCh38;
|
|
398
|
-
return datasets;
|
|
399
|
-
}
|
|
330
|
+
},
|
|
331
|
+
decisionTree: decisionTreeGRCh38,
|
|
332
|
+
sampleTree: sampleTreeGRCh38,
|
|
333
|
+
vcfMeta: vcfMetaGRCh38,
|
|
334
|
+
};
|
|
335
|
+
}
|
|
400
336
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
337
|
+
async function fetchReportDataGRCh38Data100Samples(): Promise<ReportData> {
|
|
338
|
+
return {
|
|
339
|
+
config: configVcf as unknown as Json,
|
|
340
|
+
metadata: {
|
|
341
|
+
app: {
|
|
342
|
+
name: "vcf-report",
|
|
343
|
+
version: "0.0.8",
|
|
344
|
+
args: "-i testdata_b38_100Samples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
345
|
+
},
|
|
346
|
+
htsFile: {
|
|
347
|
+
uri: "testdata_b38_100Samples.vcf",
|
|
348
|
+
htsFormat: "VCF",
|
|
349
|
+
genomeAssembly: "GRCh38",
|
|
350
|
+
},
|
|
351
|
+
} as Metadata,
|
|
352
|
+
data: samples100,
|
|
353
|
+
binary: {
|
|
354
|
+
vcf: await fetchVcfSamples100GRCh38(),
|
|
355
|
+
fastaGz: await fetchFastaGzGRCh38(),
|
|
356
|
+
genesGz: await fetchGenesGzGRCh38(),
|
|
357
|
+
},
|
|
358
|
+
decisionTree: decisionTreeGRCh38,
|
|
359
|
+
sampleTree: sampleTreeGRCh38,
|
|
360
|
+
vcfMeta: vcfMetaGRCh38,
|
|
361
|
+
};
|
|
362
|
+
}
|
|
406
363
|
|
|
407
|
-
|
|
408
|
-
|
|
364
|
+
async function fetchReportDataGRCh38Str(): Promise<ReportData> {
|
|
365
|
+
return {
|
|
366
|
+
config: configCram as unknown as Json,
|
|
367
|
+
metadata: {
|
|
368
|
+
app: {
|
|
369
|
+
name: "vcf-report",
|
|
370
|
+
version: "0.0.8",
|
|
371
|
+
args: "-i testdata_b38_100Samples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
372
|
+
},
|
|
373
|
+
htsFile: {
|
|
374
|
+
uri: "testdata_b38_100Samples.vcf",
|
|
375
|
+
htsFormat: "VCF",
|
|
376
|
+
genomeAssembly: "GRCh38",
|
|
377
|
+
},
|
|
378
|
+
} as Metadata,
|
|
379
|
+
data: samplesStr,
|
|
380
|
+
binary: {
|
|
381
|
+
vcf: await fetchVcfStrGRCh38(),
|
|
382
|
+
fastaGz: await fetchFastaGzGRCh38(),
|
|
383
|
+
genesGz: await fetchGenesGzGRCh38(),
|
|
384
|
+
cram: {
|
|
385
|
+
Patient: {
|
|
386
|
+
cram: await fetchStrCramGRCh38(),
|
|
387
|
+
crai: await fetchStrCraiGRCh38(),
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
decisionTree: decisionTreeStrGRCh38,
|
|
392
|
+
sampleTree: sampleTreeGRCh38,
|
|
393
|
+
vcfMeta: vcfMetaGRCh38,
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
async function fetchReportDataGRCh38NoSample(): Promise<ReportData> {
|
|
398
|
+
return {
|
|
399
|
+
config: configVcf as unknown as Json,
|
|
400
|
+
metadata: {
|
|
401
|
+
app: {
|
|
402
|
+
name: "vcf-report",
|
|
403
|
+
version: "0.0.8",
|
|
404
|
+
args: "-i testdata_b38_1NoSamples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
405
|
+
},
|
|
406
|
+
htsFile: {
|
|
407
|
+
uri: "testdata_b38_NoSamples.vcf",
|
|
408
|
+
htsFormat: "VCF",
|
|
409
|
+
genomeAssembly: "GRCh38",
|
|
410
|
+
},
|
|
411
|
+
} as Metadata,
|
|
412
|
+
data: { samples: [], phenotypes: [] },
|
|
413
|
+
binary: {
|
|
414
|
+
vcf: await fetchVcfSamples0GRCh38(),
|
|
415
|
+
fastaGz: await fetchFastaGzGRCh38(),
|
|
416
|
+
genesGz: await fetchGenesGzGRCh38(),
|
|
417
|
+
},
|
|
418
|
+
decisionTree: decisionTreeGRCh38,
|
|
419
|
+
sampleTree: sampleTreeGRCh38,
|
|
420
|
+
vcfMeta: vcfMetaGRCh38,
|
|
421
|
+
};
|
|
409
422
|
}
|