@molgenis/vip-report-template 6.2.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -1
- package/.travis.yml +9 -9
- package/README.md +411 -1
- package/eslint.config.mjs +11 -0
- package/package.json +40 -35
- package/scripts/deploy_npm_registry.sh +5 -0
- package/src/App.tsx +30 -24
- package/src/assets/sass/main.scss +12 -4
- package/src/components/Allele.tsx +95 -0
- package/src/components/Anchor.tsx +1 -1
- package/src/components/Breadcrumb.tsx +6 -4
- package/src/components/DatasetDropdown.tsx +12 -25
- package/src/components/ErrorNotification.tsx +9 -0
- package/src/components/GenomeBrowser.tsx +40 -23
- package/src/components/HpoTerm.tsx +1 -1
- package/src/components/{record/Pager.tsx → Pager.tsx} +21 -14
- package/src/components/RecordsPerPage.tsx +9 -7
- package/src/components/RecordsTable.tsx +130 -0
- package/src/components/SampleTable.tsx +70 -98
- package/src/components/SearchBox.tsx +8 -2
- package/src/components/Sort.tsx +28 -25
- package/src/components/Table.tsx +16 -0
- package/src/components/Tooltip.tsx +20 -0
- package/src/components/VariantBreadcrumb.tsx +54 -0
- package/src/components/VariantConsequenceContainer.tsx +100 -0
- package/src/components/VariantConsequenceTable.tsx +58 -0
- package/src/components/VariantContainer.tsx +71 -0
- package/src/components/VariantFilters.tsx +27 -0
- package/src/components/VariantGenotypeTable.tsx +44 -0
- package/src/components/VariantInfoTable.tsx +24 -33
- package/src/components/VariantResults.tsx +103 -0
- package/src/components/VariantTable.tsx +62 -66
- package/src/components/VariantTypeSelect.tsx +34 -0
- package/src/components/VariantsContainer.tsx +150 -0
- package/src/components/VariantsContainerHeader.tsx +70 -0
- package/src/components/field/Field.tsx +80 -0
- package/src/components/field/FieldAlt.tsx +19 -0
- package/src/components/field/FieldChrom.tsx +6 -0
- package/src/components/{record/Id.tsx → field/FieldFilter.tsx} +2 -1
- package/src/components/field/FieldFormat.tsx +10 -0
- package/src/components/{record/Filter.tsx → field/FieldId.tsx} +1 -1
- package/src/components/field/FieldPos.tsx +6 -0
- package/src/components/field/FieldQual.tsx +6 -0
- package/src/components/field/FieldRef.tsx +8 -0
- package/src/components/field/composed/FieldClinVar.tsx +72 -0
- package/src/components/field/composed/FieldComposed.tsx +68 -0
- package/src/components/field/composed/FieldGene.tsx +39 -0
- package/src/components/field/composed/FieldGenotype.tsx +35 -0
- package/src/components/{record/format/GenotypeField.tsx → field/composed/FieldGenotypeSnvSv.tsx} +20 -16
- package/src/components/field/composed/FieldGenotypeStr.tsx +31 -0
- package/src/components/field/composed/FieldGnomAd.tsx +58 -0
- package/src/components/field/composed/FieldHpo.tsx +50 -0
- package/src/components/field/composed/FieldInheritanceModes.tsx +32 -0
- package/src/components/field/composed/FieldLocus.tsx +18 -0
- package/src/components/field/composed/FieldVipC.tsx +25 -0
- package/src/components/field/composed/FieldVipCS.tsx +15 -0
- package/src/components/field/composed/FieldVkgl.tsx +37 -0
- package/src/components/field/genotype/FieldGenotype.tsx +19 -0
- package/src/components/field/genotype/FieldGenotypeType.tsx +9 -0
- package/src/components/field/info/FieldConsequence.tsx +15 -0
- package/src/components/{record/info/Hgvs.tsx → field/info/FieldHgvs.tsx} +4 -6
- package/src/components/field/info/FieldInfo.tsx +27 -0
- package/src/components/{record/info/PubMed.tsx → field/info/FieldPubMed.tsx} +4 -7
- package/src/components/field/typed/FieldCategorical.tsx +17 -0
- package/src/components/{record/field/FieldValueCharacter.tsx → field/typed/FieldCharacter.tsx} +3 -2
- package/src/components/{record/field/FieldValueFlag.tsx → field/typed/FieldFlag.tsx} +3 -2
- package/src/components/{record/field/FieldValueFloat.tsx → field/typed/FieldFloat.tsx} +3 -2
- package/src/components/{record/field/FieldValueInteger.tsx → field/typed/FieldInteger.tsx} +3 -2
- package/src/components/{record/field/FieldValueString.tsx → field/typed/FieldString.tsx} +3 -2
- package/src/components/field/typed/FieldTyped.tsx +20 -0
- package/src/components/field/typed/FieldTypedItem.tsx +49 -0
- package/src/components/field/typed/FieldTypedMultiple.tsx +21 -0
- package/src/components/filter/Filter.tsx +56 -48
- package/src/components/filter/FilterWrapper.scss +23 -0
- package/src/components/filter/FilterWrapper.tsx +63 -0
- package/src/components/filter/composed/FilterAllelicImbalance.tsx +26 -0
- package/src/components/filter/composed/FilterComposed.tsx +92 -0
- package/src/components/filter/composed/FilterDeNovo.tsx +35 -0
- package/src/components/filter/composed/FilterHpo.tsx +16 -0
- package/src/components/filter/composed/FilterInheritance.tsx +42 -0
- package/src/components/filter/composed/FilterLocus.tsx +75 -0
- package/src/components/filter/composed/FilterVipC.tsx +16 -0
- package/src/components/filter/composed/FilterVipCS.tsx +16 -0
- package/src/components/filter/fixed/FilterAlt.tsx +20 -0
- package/src/components/filter/fixed/FilterChrom.tsx +22 -0
- package/src/components/filter/fixed/FilterFilter.tsx +20 -0
- package/src/components/filter/fixed/FilterFixed.tsx +96 -0
- package/src/components/filter/fixed/FilterId.tsx +20 -0
- package/src/components/filter/fixed/FilterPos.tsx +22 -0
- package/src/components/filter/fixed/FilterQual.tsx +21 -0
- package/src/components/filter/fixed/FilterRef.tsx +22 -0
- package/src/components/filter/typed/FilterCategorical.tsx +119 -0
- package/src/components/filter/typed/FilterFlag.tsx +23 -0
- package/src/components/filter/typed/FilterInterval.tsx +72 -0
- package/src/components/filter/typed/FilterString.tsx +43 -0
- package/src/components/filter/typed/FilterTyped.tsx +56 -0
- package/src/components/form/ButtonApply.tsx +11 -0
- package/src/components/form/ButtonDownload.tsx +11 -0
- package/src/components/form/ButtonReset.tsx +9 -0
- package/src/components/{Checkbox.tsx → form/Checkbox.tsx} +4 -9
- package/src/components/form/Input.tsx +19 -0
- package/src/components/form/Select.scss +7 -0
- package/src/components/form/Select.tsx +34 -0
- package/src/components/tree/DecisionTreeBoolMultiQuery.tsx +1 -1
- package/src/components/tree/DecisionTreeBoolQuery.tsx +1 -1
- package/src/components/tree/DecisionTreeNode.tsx +41 -39
- package/src/components/tree/DecisionTreeNodeBool.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeBoolMulti.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeCategorical.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeExists.tsx +1 -1
- package/src/components/tree/DecisionTreeNodeLeaf.tsx +1 -1
- package/src/components/tree/DecisionTreeOutcomeNode.tsx +1 -1
- package/src/components/tree/DecisionTreePath.tsx +1 -1
- package/src/igv.d.ts +2 -1
- package/src/index.tsx +48 -19
- package/src/mocks/GRCh37/decisionTree.json +23 -22
- package/src/mocks/GRCh37/field_metadata.json +435 -95
- package/src/mocks/GRCh37/sampleTree.json +21 -1
- package/src/mocks/GRCh37/static.ts +62 -134
- package/src/mocks/GRCh37/vcf/family.vcf.blob +9 -3
- package/src/mocks/GRCh38/decisionTree.json +52 -33
- package/src/mocks/GRCh38/decisionTreeStr.json +572 -0
- package/src/mocks/GRCh38/fasta/chr1_149380406-149403321.fasta.gz.blob +0 -0
- package/src/mocks/GRCh38/field_metadata.json +435 -95
- package/src/mocks/GRCh38/sampleTree.json +175 -0
- package/src/mocks/GRCh38/static.ts +101 -42
- package/src/mocks/GRCh38/str.cram.blob +0 -0
- package/src/mocks/GRCh38/str.cram.crai.blob +0 -0
- package/src/mocks/GRCh38/vcf/family.vcf.blob +25 -24
- package/src/mocks/GRCh38/vcf/no_vep.vcf.blob +29 -28
- package/src/mocks/GRCh38/vcf/samples_0.vcf.blob +28 -27
- package/src/mocks/GRCh38/vcf/samples_1.vcf.blob +29 -28
- package/src/mocks/GRCh38/vcf/samples_100.vcf.blob +28 -27
- package/src/mocks/GRCh38/vcf/str.vcf.blob +321 -0
- package/src/mocks/MockApiClient.ts +339 -332
- package/src/mocks/config_cram.json +701 -0
- package/src/mocks/config_vcf.json +699 -0
- package/src/store/app.ts +30 -0
- package/src/store/index.tsx +3 -168
- package/src/store/variants.ts +182 -0
- package/src/types/config.d.ts +190 -0
- package/src/types/configCellComposed.d.ts +86 -0
- package/src/types/configCells.d.ts +129 -0
- package/src/types/configFilter.d.ts +80 -0
- package/src/types/configFilterComposed.d.ts +60 -0
- package/src/types/configSort.d.ts +13 -0
- package/src/types/filter.d.ts +17 -0
- package/src/types/store.d.ts +34 -0
- package/src/utils/api.ts +281 -0
- package/src/utils/config/config.ts +182 -0
- package/src/utils/config/configCells.ts +74 -0
- package/src/utils/config/configCellsComposed.ts +508 -0
- package/src/utils/config/configCellsField.ts +61 -0
- package/src/utils/config/configCellsFixed.ts +126 -0
- package/src/utils/config/configFilters.ts +46 -0
- package/src/utils/config/configFiltersComposed.ts +208 -0
- package/src/utils/config/configFiltersField.ts +49 -0
- package/src/utils/config/configFiltersFixed.ts +106 -0
- package/src/utils/config/configSorts.ts +44 -0
- package/src/utils/config/configValidator.ts +380 -0
- package/src/utils/config/configVip.ts +25 -0
- package/src/utils/csq.ts +115 -0
- package/src/utils/decisionTree.ts +45 -0
- package/src/utils/download.ts +30 -0
- package/src/utils/error.ts +69 -0
- package/src/utils/query/query.ts +55 -0
- package/src/utils/query/queryFilter.ts +132 -0
- package/src/utils/query/queryFilterComposed.ts +247 -0
- package/src/utils/query/queryFilterField.ts +75 -0
- package/src/utils/query/queryFilterFixed.ts +44 -0
- package/src/utils/query/querySample.ts +18 -0
- package/src/utils/query/queryVariantType.ts +76 -0
- package/src/utils/query/selector.ts +41 -0
- package/src/utils/{sortUtils.ts → query/sort.ts} +32 -11
- package/src/utils/sample.ts +19 -35
- package/src/utils/utils.ts +66 -2
- package/src/utils/variantType.ts +43 -0
- package/src/utils/vcf.ts +352 -0
- package/src/views/Help.tsx +109 -114
- package/src/views/Home.tsx +3 -2
- package/src/views/Sample.tsx +12 -7
- package/src/views/SampleVariant.tsx +23 -112
- package/src/views/SampleVariantConsequence.tsx +54 -144
- package/src/views/SampleVariants.tsx +33 -445
- package/src/views/SampleVariantsRedirect.tsx +20 -0
- package/src/views/Samples.tsx +7 -10
- package/src/views/Variant.tsx +31 -61
- package/src/views/VariantConsequence.tsx +42 -72
- package/src/views/Variants.tsx +29 -138
- package/src/views/VariantsRedirect.tsx +25 -0
- package/src/views/data/data.tsx +32 -6
- package/tests/store/variants.test.ts +122 -0
- package/tests/utils/config/config.test.ts +167 -0
- package/tests/utils/config/configCells.test.ts +86 -0
- package/tests/utils/config/configCellsComposed.test.ts +1163 -0
- package/tests/utils/config/configCellsField.test.ts +164 -0
- package/tests/utils/config/configCellsFixed.test.ts +99 -0
- package/tests/utils/config/configFilters.test.ts +80 -0
- package/tests/utils/config/configFiltersComposed.test.ts +504 -0
- package/tests/utils/config/configFiltersField.test.ts +140 -0
- package/tests/utils/config/configFiltersFixed.test.ts +81 -0
- package/tests/utils/config/configSorts.test.ts +55 -0
- package/tests/utils/config/configValidator.test.ts +56 -0
- package/tests/utils/config/configVip.test.ts +53 -0
- package/tests/utils/decisionTree.test.ts +71 -0
- package/tests/utils/download.test.ts +20 -0
- package/tests/utils/query/query.test.ts +84 -0
- package/tests/utils/query/queryFilter.test.ts +243 -0
- package/tests/utils/query/queryFilterComposed.test.ts +301 -0
- package/tests/utils/query/queryFilterField.test.ts +75 -0
- package/tests/utils/query/queryFilterFixed.test.ts +86 -0
- package/tests/utils/query/querySample.test.ts +45 -0
- package/tests/utils/query/queryVariantType.test.ts +56 -0
- package/{src/__tests__/sortUtils.test.ts → tests/utils/query/sort.test.ts} +3 -4
- package/tests/utils/sample.test.ts +259 -0
- package/tests/utils/utils.test.ts +120 -0
- package/tests/utils/variantType.test.ts +48 -0
- package/tests/utils/vcf.test.ts +649 -0
- package/tsconfig.json +6 -2
- package/vite.config.mts +20 -3
- package/.eslintignore +0 -4
- package/.eslintrc.js +0 -23
- package/src/Api.ts +0 -12
- package/src/__tests__/decisionTreeUtils.test.ts +0 -75
- package/src/__tests__/field.test.ts +0 -107
- package/src/__tests__/query.test.ts +0 -188
- package/src/__tests__/sample.test.ts +0 -184
- package/src/__tests__/utils.test.ts +0 -24
- package/src/__tests__/viewUtils.test.ts +0 -125
- package/src/components/ConsequenceTable.tsx +0 -45
- package/src/components/Error.tsx +0 -9
- package/src/components/FieldHeader.tsx +0 -26
- package/src/components/InfoCollapsablePane.tsx +0 -90
- package/src/components/VariantInfoNestedTable.tsx +0 -127
- package/src/components/VariantSampleTable.tsx +0 -58
- package/src/components/VariantsSampleTable.tsx +0 -184
- package/src/components/VariantsTable.tsx +0 -125
- package/src/components/filter/FilterAllelicBalance.tsx +0 -81
- package/src/components/filter/FilterCategorical.tsx +0 -81
- package/src/components/filter/FilterClinVar.tsx +0 -21
- package/src/components/filter/FilterGene.tsx +0 -34
- package/src/components/filter/FilterHpo.tsx +0 -161
- package/src/components/filter/FilterInheritance.tsx +0 -162
- package/src/components/filter/FilterIntegerGq.tsx +0 -47
- package/src/components/filter/FilterVI.tsx +0 -68
- package/src/components/filter/FilterVariantType.tsx +0 -146
- package/src/components/filter/Filters.tsx +0 -29
- package/src/components/filter/InfoFilter.tsx +0 -39
- package/src/components/filter/InfoFilters.tsx +0 -35
- package/src/components/filter/SampleFilters.tsx +0 -93
- package/src/components/filter/SamplesFilters.tsx +0 -33
- package/src/components/record/Allele.tsx +0 -38
- package/src/components/record/AlleleBreakend.tsx +0 -5
- package/src/components/record/AlleleMissing.tsx +0 -5
- package/src/components/record/AlleleNucs.tsx +0 -49
- package/src/components/record/AlleleSymbolic.tsx +0 -5
- package/src/components/record/Alt.tsx +0 -17
- package/src/components/record/Chrom.tsx +0 -5
- package/src/components/record/Format.tsx +0 -40
- package/src/components/record/Info.tsx +0 -55
- package/src/components/record/Pos.tsx +0 -5
- package/src/components/record/Qual.tsx +0 -5
- package/src/components/record/RecordDownload.tsx +0 -66
- package/src/components/record/Ref.tsx +0 -6
- package/src/components/record/field/Field.tsx +0 -36
- package/src/components/record/field/FieldMultipleValue.tsx +0 -22
- package/src/components/record/field/FieldSingleValue.tsx +0 -35
- package/src/components/record/info/ClinVar.tsx +0 -81
- package/src/components/record/info/Consequence.tsx +0 -18
- package/src/components/record/info/Gene.tsx +0 -56
- package/src/components/record/info/GnomAD.tsx +0 -54
- package/src/components/record/info/Hpo.tsx +0 -52
- package/src/components/record/info/InheritanceModes.tsx +0 -22
- package/src/components/record/info/VipC.tsx +0 -23
- package/src/components/record/info/Vkgl.tsx +0 -42
- package/src/mocks/GRCh37/vcf/no_vep.vcf.blob +0 -61
- package/src/mocks/GRCh37/vcf/samples_0.vcf.blob +0 -93
- package/src/mocks/GRCh37/vcf/samples_1.vcf.blob +0 -93
- package/src/mocks/GRCh37/vcf/samples_100.vcf.blob +0 -93
- package/src/utils/ApiUtils.ts +0 -263
- package/src/utils/csqUtils.ts +0 -27
- package/src/utils/decisionTreeUtils.ts +0 -31
- package/src/utils/field.ts +0 -49
- package/src/utils/query.ts +0 -154
- package/src/utils/viewUtils.ts +0 -32
|
@@ -1,415 +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
|
-
|
|
23
|
+
fetchCrai as fetchCraiGRCh37,
|
|
24
|
+
fetchCram as fetchCramGRCh37,
|
|
25
|
+
fetchFastaGz as fetchFastaGzGRCh37,
|
|
26
|
+
fetchGenesGz as fetchGenesGzGRCh37,
|
|
27
|
+
fetchVcfFamily as fetchVcfFamilyGRCh37,
|
|
24
28
|
samplesFamily as samplesFamilyGRCh37,
|
|
29
|
+
sampleTree as sampleTreeGRCh37,
|
|
25
30
|
vcfMeta as vcfMetaGRCh37,
|
|
26
|
-
vcfFamily as vcfFamilyGRCh37,
|
|
27
|
-
vcfNoVep as vcfNoVepGRCh37,
|
|
28
|
-
vcfSamples0 as vcfSamples0GRCh37,
|
|
29
|
-
vcfSamples1 as vcfSamples1GRCh37,
|
|
30
|
-
vcfSamples100 as vcfSamples100GRCh37,
|
|
31
|
-
samplesFamilyDuoPlusSister as samplesFamilyDuoPlusSisterGRCh37,
|
|
32
31
|
} from "./GRCh37/static";
|
|
33
32
|
import {
|
|
34
|
-
cram as cramGRCh38,
|
|
35
|
-
crai as craiGRCh38,
|
|
36
33
|
decisionTree as decisionTreeGRCh38,
|
|
37
|
-
|
|
38
|
-
|
|
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,
|
|
39
47
|
samplesFamily as samplesFamilyGRCh38,
|
|
48
|
+
samplesStr,
|
|
49
|
+
sampleTree as sampleTreeGRCh38,
|
|
40
50
|
vcfMeta as vcfMetaGRCh38,
|
|
41
|
-
vcfFamily as vcfFamilyGRCh38,
|
|
42
|
-
vcfNoVep as vcfNoVepGRCh38,
|
|
43
|
-
vcfSamples0 as vcfSamples0GRCh38,
|
|
44
|
-
vcfSamples1 as vcfSamples1GRCh38,
|
|
45
|
-
vcfSamples100 as vcfSamples100GRCh38,
|
|
46
51
|
} from "./GRCh38/static";
|
|
47
|
-
import
|
|
52
|
+
import AsyncLock from "async-lock";
|
|
53
|
+
|
|
54
|
+
const lock = new AsyncLock();
|
|
48
55
|
|
|
49
56
|
/**
|
|
50
57
|
* API client that uses mocked data as data source.
|
|
51
58
|
*/
|
|
52
59
|
export class MockApiClient implements Api {
|
|
53
|
-
private
|
|
54
|
-
|
|
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;
|
|
55
72
|
|
|
56
73
|
constructor() {
|
|
57
|
-
this.
|
|
58
|
-
this.apiClient = this.createApiClient(this.getDatasetIds()[0]);
|
|
74
|
+
this.dataSetId = MockApiClient.dataSetIds[0]!;
|
|
59
75
|
}
|
|
60
76
|
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
async getConfig(): Promise<Json | null> {
|
|
78
|
+
const apiClient = await this.getApiClient();
|
|
79
|
+
return apiClient.getConfig();
|
|
63
80
|
}
|
|
64
81
|
|
|
65
|
-
|
|
66
|
-
|
|
82
|
+
async getFastaGz(contig: string, pos: number): Promise<Uint8Array | null> {
|
|
83
|
+
const apiClient = await this.getApiClient();
|
|
84
|
+
return apiClient.getFastaGz(contig, pos);
|
|
67
85
|
}
|
|
68
86
|
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
async getGenesGz(): Promise<Uint8Array | null> {
|
|
88
|
+
const apiClient = await this.getApiClient();
|
|
89
|
+
return apiClient.getGenesGz();
|
|
71
90
|
}
|
|
72
91
|
|
|
73
|
-
|
|
74
|
-
|
|
92
|
+
async getCram(sampleId: string): Promise<Cram | null> {
|
|
93
|
+
const apiClient = await this.getApiClient();
|
|
94
|
+
return apiClient.getCram(sampleId);
|
|
75
95
|
}
|
|
76
96
|
|
|
77
|
-
|
|
78
|
-
|
|
97
|
+
async getDecisionTree(): Promise<DecisionTree | null> {
|
|
98
|
+
const apiClient = await this.getApiClient();
|
|
99
|
+
return apiClient.getDecisionTree();
|
|
79
100
|
}
|
|
80
101
|
|
|
81
|
-
|
|
82
|
-
|
|
102
|
+
async getSampleTree(): Promise<DecisionTree | null> {
|
|
103
|
+
const apiClient = await this.getApiClient();
|
|
104
|
+
return apiClient.getSampleTree();
|
|
83
105
|
}
|
|
84
106
|
|
|
85
|
-
|
|
86
|
-
|
|
107
|
+
async getHtsFileMetadata(): Promise<HtsFileMetadata> {
|
|
108
|
+
const apiClient = await this.getApiClient();
|
|
109
|
+
return apiClient.getHtsFileMetadata();
|
|
87
110
|
}
|
|
88
111
|
|
|
89
|
-
|
|
90
|
-
|
|
112
|
+
async getAppMetadata(): Promise<AppMetadata> {
|
|
113
|
+
const apiClient = await this.getApiClient();
|
|
114
|
+
return apiClient.getAppMetadata();
|
|
91
115
|
}
|
|
92
116
|
|
|
93
|
-
|
|
94
|
-
|
|
117
|
+
async getPhenotypes(params: Params): Promise<PagedItems<Phenotype>> {
|
|
118
|
+
const apiClient = await this.getApiClient();
|
|
119
|
+
return apiClient.getPhenotypes(params);
|
|
95
120
|
}
|
|
96
121
|
|
|
97
|
-
|
|
98
|
-
|
|
122
|
+
async getRecordById(id: number): Promise<Item<VcfRecord>> {
|
|
123
|
+
const apiClient = await this.getApiClient();
|
|
124
|
+
return apiClient.getRecordById(id);
|
|
99
125
|
}
|
|
100
126
|
|
|
101
|
-
|
|
102
|
-
|
|
127
|
+
async getRecords(params: Params): Promise<PagedItems<VcfRecord>> {
|
|
128
|
+
const apiClient = await this.getApiClient();
|
|
129
|
+
return apiClient.getRecords(params);
|
|
103
130
|
}
|
|
104
131
|
|
|
105
|
-
|
|
106
|
-
|
|
132
|
+
async getRecordsMeta(): Promise<VcfMetadata> {
|
|
133
|
+
const apiClient = await this.getApiClient();
|
|
134
|
+
return apiClient.getRecordsMeta();
|
|
107
135
|
}
|
|
108
136
|
|
|
109
|
-
|
|
110
|
-
|
|
137
|
+
async getSampleById(id: number): Promise<Item<Sample>> {
|
|
138
|
+
const apiClient = await this.getApiClient();
|
|
139
|
+
return apiClient.getSampleById(id);
|
|
111
140
|
}
|
|
112
141
|
|
|
113
|
-
|
|
114
|
-
|
|
142
|
+
async getSamples(params: Params): Promise<PagedItems<Sample>> {
|
|
143
|
+
const apiClient = await this.getApiClient();
|
|
144
|
+
return apiClient.getSamples(params);
|
|
115
145
|
}
|
|
116
146
|
|
|
117
147
|
getDatasetIds(): string[] {
|
|
118
|
-
return
|
|
148
|
+
return MockApiClient.dataSetIds;
|
|
119
149
|
}
|
|
120
150
|
|
|
121
151
|
selectDataset(id: string): void {
|
|
122
|
-
this.
|
|
152
|
+
this.dataSetId = id;
|
|
153
|
+
this.apiClient = undefined;
|
|
123
154
|
}
|
|
124
155
|
|
|
125
|
-
private
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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",
|
|
150
213
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const mockReportDataNoVep: ReportData = {
|
|
157
|
-
metadata: {
|
|
158
|
-
app: {
|
|
159
|
-
name: "vcf-report",
|
|
160
|
-
version: "0.0.8",
|
|
161
|
-
args: "-i testdata_b37.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
162
|
-
},
|
|
163
|
-
htsFile: {
|
|
164
|
-
uri: "testdata_b37.vcf",
|
|
165
|
-
htsFormat: "VCF",
|
|
166
|
-
genomeAssembly: "GRCh37",
|
|
167
|
-
},
|
|
168
|
-
} as Metadata,
|
|
169
|
-
data: samplesFamilyDuoPlusSisterGRCh37,
|
|
170
|
-
binary: {
|
|
171
|
-
vcf: vcfNoVepGRCh37,
|
|
172
|
-
fastaGz: fastaGzGRCh37,
|
|
173
|
-
genesGz: genesGzGRCh37,
|
|
174
|
-
cram: {
|
|
175
|
-
Patient: {
|
|
176
|
-
cram: cramGRCh37,
|
|
177
|
-
crai: craiGRCh37,
|
|
178
|
-
},
|
|
179
|
-
},
|
|
214
|
+
htsFile: {
|
|
215
|
+
uri: "/path/to/testdata_b37_vip.vcf",
|
|
216
|
+
htsFormat: "VCF",
|
|
217
|
+
genomeAssembly: "GRCh37",
|
|
180
218
|
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
htsFile: {
|
|
193
|
-
uri: "testdata_b37_1Sample.vcf",
|
|
194
|
-
htsFormat: "VCF",
|
|
195
|
-
genomeAssembly: "GRCh37",
|
|
196
|
-
},
|
|
197
|
-
} as Metadata,
|
|
198
|
-
data: samples1,
|
|
199
|
-
binary: {
|
|
200
|
-
vcf: vcfSamples1GRCh37,
|
|
201
|
-
fastaGz: fastaGzGRCh37,
|
|
202
|
-
genesGz: genesGzGRCh37,
|
|
203
|
-
cram: {
|
|
204
|
-
SAMPLE1: {
|
|
205
|
-
cram: cramGRCh37,
|
|
206
|
-
crai: craiGRCh37,
|
|
207
|
-
},
|
|
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(),
|
|
208
229
|
},
|
|
209
230
|
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
} as Metadata,
|
|
227
|
-
data: samples100,
|
|
228
|
-
binary: {
|
|
229
|
-
vcf: vcfSamples100GRCh37,
|
|
230
|
-
fastaGz: fastaGzGRCh37,
|
|
231
|
-
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",
|
|
232
246
|
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
const mockReportDataNoSample: ReportData = {
|
|
238
|
-
metadata: {
|
|
239
|
-
app: {
|
|
240
|
-
name: "vcf-report",
|
|
241
|
-
version: "0.0.8",
|
|
242
|
-
args: "-i testdata_b37_1NoSamples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
243
|
-
},
|
|
244
|
-
htsFile: {
|
|
245
|
-
uri: "testdata_b37_NoSamples.vcf",
|
|
246
|
-
htsFormat: "VCF",
|
|
247
|
-
genomeAssembly: "GRCh37",
|
|
248
|
-
},
|
|
249
|
-
} as Metadata,
|
|
250
|
-
data: { samples: [], phenotypes: [] },
|
|
251
|
-
binary: {
|
|
252
|
-
vcf: vcfSamples0GRCh37,
|
|
253
|
-
fastaGz: fastaGzGRCh37,
|
|
254
|
-
genesGz: genesGzGRCh37,
|
|
247
|
+
htsFile: {
|
|
248
|
+
uri: "testdata_b38_vip.vcf",
|
|
249
|
+
htsFormat: "VCF",
|
|
250
|
+
genomeAssembly: "GRCh38",
|
|
255
251
|
},
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
},
|
|
267
|
-
htsFile: {
|
|
268
|
-
uri: "testdata_b38_vip.vcf",
|
|
269
|
-
htsFormat: "VCF",
|
|
270
|
-
genomeAssembly: "GRCh38",
|
|
271
|
-
},
|
|
272
|
-
} as Metadata,
|
|
273
|
-
data: samplesFamilyGRCh38,
|
|
274
|
-
binary: {
|
|
275
|
-
vcf: vcfFamilyGRCh38,
|
|
276
|
-
fastaGz: fastaGzGRCh38,
|
|
277
|
-
genesGz: genesGzGRCh38,
|
|
278
|
-
cram: {
|
|
279
|
-
Patient: {
|
|
280
|
-
cram: cramGRCh38,
|
|
281
|
-
crai: craiGRCh38,
|
|
282
|
-
},
|
|
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(),
|
|
283
262
|
},
|
|
284
263
|
},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
},
|
|
301
|
-
} as Metadata,
|
|
302
|
-
data: samplesFamilyGRCh38,
|
|
303
|
-
binary: {
|
|
304
|
-
vcf: vcfNoVepGRCh38,
|
|
305
|
-
fastaGz: fastaGzGRCh38,
|
|
306
|
-
genesGz: genesGzGRCh38,
|
|
307
|
-
cram: {
|
|
308
|
-
Patient: {
|
|
309
|
-
cram: cramGRCh38,
|
|
310
|
-
crai: craiGRCh38,
|
|
311
|
-
},
|
|
312
|
-
},
|
|
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",
|
|
313
279
|
},
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
const mockReportData1SampleGRCh38: ReportData = {
|
|
319
|
-
metadata: {
|
|
320
|
-
app: {
|
|
321
|
-
name: "vcf-report",
|
|
322
|
-
version: "0.0.8",
|
|
323
|
-
args: "-i testdata_b38_1Sample.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
|
|
324
|
-
},
|
|
325
|
-
htsFile: {
|
|
326
|
-
uri: "testdata_b38_1Sample.vcf",
|
|
327
|
-
htsFormat: "VCF",
|
|
328
|
-
genomeAssembly: "GRCh38",
|
|
329
|
-
},
|
|
330
|
-
} as Metadata,
|
|
331
|
-
data: samples1,
|
|
332
|
-
binary: {
|
|
333
|
-
vcf: vcfSamples1GRCh38,
|
|
334
|
-
fastaGz: fastaGzGRCh38,
|
|
335
|
-
genesGz: genesGzGRCh38,
|
|
336
|
-
cram: {
|
|
337
|
-
SAMPLE1: {
|
|
338
|
-
cram: cramGRCh38,
|
|
339
|
-
crai: craiGRCh38,
|
|
340
|
-
},
|
|
341
|
-
},
|
|
280
|
+
htsFile: {
|
|
281
|
+
uri: "testdata_b38.vcf",
|
|
282
|
+
htsFormat: "VCF",
|
|
283
|
+
genomeAssembly: "GRCh38",
|
|
342
284
|
},
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
},
|
|
354
|
-
htsFile: {
|
|
355
|
-
uri: "testdata_b38_100Samples.vcf",
|
|
356
|
-
htsFormat: "VCF",
|
|
357
|
-
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(),
|
|
358
295
|
},
|
|
359
|
-
} as Metadata,
|
|
360
|
-
data: samples100,
|
|
361
|
-
binary: {
|
|
362
|
-
vcf: vcfSamples100GRCh38,
|
|
363
|
-
fastaGz: fastaGzGRCh38,
|
|
364
|
-
genesGz: genesGzGRCh38,
|
|
365
296
|
},
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
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(),
|
|
381
328
|
},
|
|
382
|
-
} as Metadata,
|
|
383
|
-
data: { samples: [], phenotypes: [] },
|
|
384
|
-
binary: {
|
|
385
|
-
vcf: vcfSamples0GRCh38,
|
|
386
|
-
fastaGz: fastaGzGRCh38,
|
|
387
|
-
genesGz: genesGzGRCh38,
|
|
388
329
|
},
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
datasets["GRCh37 Family no VEP"] = mockReportDataNoVep;
|
|
396
|
-
datasets["GRCh37 Samples 0"] = mockReportDataNoSample;
|
|
397
|
-
datasets["GRCh37 Samples 1"] = mockReportData1Sample;
|
|
398
|
-
datasets["GRCh37 Samples 100"] = mockReportData100Samples;
|
|
399
|
-
datasets["GRCh38 Family"] = mockReportDataFamilyGRCh38;
|
|
400
|
-
datasets["GRCh38 Family no VEP"] = mockReportDataNoVepGRCh38;
|
|
401
|
-
datasets["GRCh38 Samples 0"] = mockReportDataNoSampleGRCh38;
|
|
402
|
-
datasets["GRCh38 Samples 1"] = mockReportData1SampleGRCh38;
|
|
403
|
-
datasets["GRCh38 Samples 100"] = mockReportData100SamplesGRCh38;
|
|
404
|
-
return datasets;
|
|
405
|
-
}
|
|
330
|
+
},
|
|
331
|
+
decisionTree: decisionTreeGRCh38,
|
|
332
|
+
sampleTree: sampleTreeGRCh38,
|
|
333
|
+
vcfMeta: vcfMetaGRCh38,
|
|
334
|
+
};
|
|
335
|
+
}
|
|
406
336
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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
|
+
}
|
|
412
363
|
|
|
413
|
-
|
|
414
|
-
|
|
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
|
+
};
|
|
415
422
|
}
|