@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.
Files changed (285) hide show
  1. package/.nvmrc +1 -1
  2. package/.travis.yml +9 -9
  3. package/README.md +411 -1
  4. package/eslint.config.mjs +11 -0
  5. package/package.json +40 -35
  6. package/scripts/deploy_npm_registry.sh +5 -0
  7. package/src/App.tsx +30 -24
  8. package/src/assets/sass/main.scss +12 -4
  9. package/src/components/Allele.tsx +95 -0
  10. package/src/components/Anchor.tsx +1 -1
  11. package/src/components/Breadcrumb.tsx +6 -4
  12. package/src/components/DatasetDropdown.tsx +12 -25
  13. package/src/components/ErrorNotification.tsx +9 -0
  14. package/src/components/GenomeBrowser.tsx +40 -23
  15. package/src/components/HpoTerm.tsx +1 -1
  16. package/src/components/{record/Pager.tsx → Pager.tsx} +21 -14
  17. package/src/components/RecordsPerPage.tsx +9 -7
  18. package/src/components/RecordsTable.tsx +130 -0
  19. package/src/components/SampleTable.tsx +70 -98
  20. package/src/components/SearchBox.tsx +8 -2
  21. package/src/components/Sort.tsx +28 -25
  22. package/src/components/Table.tsx +16 -0
  23. package/src/components/Tooltip.tsx +20 -0
  24. package/src/components/VariantBreadcrumb.tsx +54 -0
  25. package/src/components/VariantConsequenceContainer.tsx +100 -0
  26. package/src/components/VariantConsequenceTable.tsx +58 -0
  27. package/src/components/VariantContainer.tsx +71 -0
  28. package/src/components/VariantFilters.tsx +27 -0
  29. package/src/components/VariantGenotypeTable.tsx +44 -0
  30. package/src/components/VariantInfoTable.tsx +24 -33
  31. package/src/components/VariantResults.tsx +103 -0
  32. package/src/components/VariantTable.tsx +62 -66
  33. package/src/components/VariantTypeSelect.tsx +34 -0
  34. package/src/components/VariantsContainer.tsx +150 -0
  35. package/src/components/VariantsContainerHeader.tsx +70 -0
  36. package/src/components/field/Field.tsx +80 -0
  37. package/src/components/field/FieldAlt.tsx +19 -0
  38. package/src/components/field/FieldChrom.tsx +6 -0
  39. package/src/components/{record/Id.tsx → field/FieldFilter.tsx} +2 -1
  40. package/src/components/field/FieldFormat.tsx +10 -0
  41. package/src/components/{record/Filter.tsx → field/FieldId.tsx} +1 -1
  42. package/src/components/field/FieldPos.tsx +6 -0
  43. package/src/components/field/FieldQual.tsx +6 -0
  44. package/src/components/field/FieldRef.tsx +8 -0
  45. package/src/components/field/composed/FieldClinVar.tsx +72 -0
  46. package/src/components/field/composed/FieldComposed.tsx +68 -0
  47. package/src/components/field/composed/FieldGene.tsx +39 -0
  48. package/src/components/field/composed/FieldGenotype.tsx +35 -0
  49. package/src/components/{record/format/GenotypeField.tsx → field/composed/FieldGenotypeSnvSv.tsx} +20 -16
  50. package/src/components/field/composed/FieldGenotypeStr.tsx +31 -0
  51. package/src/components/field/composed/FieldGnomAd.tsx +58 -0
  52. package/src/components/field/composed/FieldHpo.tsx +50 -0
  53. package/src/components/field/composed/FieldInheritanceModes.tsx +32 -0
  54. package/src/components/field/composed/FieldLocus.tsx +18 -0
  55. package/src/components/field/composed/FieldVipC.tsx +25 -0
  56. package/src/components/field/composed/FieldVipCS.tsx +15 -0
  57. package/src/components/field/composed/FieldVkgl.tsx +37 -0
  58. package/src/components/field/genotype/FieldGenotype.tsx +19 -0
  59. package/src/components/field/genotype/FieldGenotypeType.tsx +9 -0
  60. package/src/components/field/info/FieldConsequence.tsx +15 -0
  61. package/src/components/{record/info/Hgvs.tsx → field/info/FieldHgvs.tsx} +4 -6
  62. package/src/components/field/info/FieldInfo.tsx +27 -0
  63. package/src/components/{record/info/PubMed.tsx → field/info/FieldPubMed.tsx} +4 -7
  64. package/src/components/field/typed/FieldCategorical.tsx +17 -0
  65. package/src/components/{record/field/FieldValueCharacter.tsx → field/typed/FieldCharacter.tsx} +3 -2
  66. package/src/components/{record/field/FieldValueFlag.tsx → field/typed/FieldFlag.tsx} +3 -2
  67. package/src/components/{record/field/FieldValueFloat.tsx → field/typed/FieldFloat.tsx} +3 -2
  68. package/src/components/{record/field/FieldValueInteger.tsx → field/typed/FieldInteger.tsx} +3 -2
  69. package/src/components/{record/field/FieldValueString.tsx → field/typed/FieldString.tsx} +3 -2
  70. package/src/components/field/typed/FieldTyped.tsx +20 -0
  71. package/src/components/field/typed/FieldTypedItem.tsx +49 -0
  72. package/src/components/field/typed/FieldTypedMultiple.tsx +21 -0
  73. package/src/components/filter/Filter.tsx +56 -48
  74. package/src/components/filter/FilterWrapper.scss +23 -0
  75. package/src/components/filter/FilterWrapper.tsx +63 -0
  76. package/src/components/filter/composed/FilterAllelicImbalance.tsx +26 -0
  77. package/src/components/filter/composed/FilterComposed.tsx +92 -0
  78. package/src/components/filter/composed/FilterDeNovo.tsx +35 -0
  79. package/src/components/filter/composed/FilterHpo.tsx +16 -0
  80. package/src/components/filter/composed/FilterInheritance.tsx +42 -0
  81. package/src/components/filter/composed/FilterLocus.tsx +75 -0
  82. package/src/components/filter/composed/FilterVipC.tsx +16 -0
  83. package/src/components/filter/composed/FilterVipCS.tsx +16 -0
  84. package/src/components/filter/fixed/FilterAlt.tsx +20 -0
  85. package/src/components/filter/fixed/FilterChrom.tsx +22 -0
  86. package/src/components/filter/fixed/FilterFilter.tsx +20 -0
  87. package/src/components/filter/fixed/FilterFixed.tsx +96 -0
  88. package/src/components/filter/fixed/FilterId.tsx +20 -0
  89. package/src/components/filter/fixed/FilterPos.tsx +22 -0
  90. package/src/components/filter/fixed/FilterQual.tsx +21 -0
  91. package/src/components/filter/fixed/FilterRef.tsx +22 -0
  92. package/src/components/filter/typed/FilterCategorical.tsx +119 -0
  93. package/src/components/filter/typed/FilterFlag.tsx +23 -0
  94. package/src/components/filter/typed/FilterInterval.tsx +72 -0
  95. package/src/components/filter/typed/FilterString.tsx +43 -0
  96. package/src/components/filter/typed/FilterTyped.tsx +56 -0
  97. package/src/components/form/ButtonApply.tsx +11 -0
  98. package/src/components/form/ButtonDownload.tsx +11 -0
  99. package/src/components/form/ButtonReset.tsx +9 -0
  100. package/src/components/{Checkbox.tsx → form/Checkbox.tsx} +4 -9
  101. package/src/components/form/Input.tsx +19 -0
  102. package/src/components/form/Select.scss +7 -0
  103. package/src/components/form/Select.tsx +34 -0
  104. package/src/components/tree/DecisionTreeBoolMultiQuery.tsx +1 -1
  105. package/src/components/tree/DecisionTreeBoolQuery.tsx +1 -1
  106. package/src/components/tree/DecisionTreeNode.tsx +41 -39
  107. package/src/components/tree/DecisionTreeNodeBool.tsx +1 -1
  108. package/src/components/tree/DecisionTreeNodeBoolMulti.tsx +1 -1
  109. package/src/components/tree/DecisionTreeNodeCategorical.tsx +1 -1
  110. package/src/components/tree/DecisionTreeNodeExists.tsx +1 -1
  111. package/src/components/tree/DecisionTreeNodeLeaf.tsx +1 -1
  112. package/src/components/tree/DecisionTreeOutcomeNode.tsx +1 -1
  113. package/src/components/tree/DecisionTreePath.tsx +1 -1
  114. package/src/igv.d.ts +2 -1
  115. package/src/index.tsx +48 -19
  116. package/src/mocks/GRCh37/decisionTree.json +23 -22
  117. package/src/mocks/GRCh37/field_metadata.json +435 -95
  118. package/src/mocks/GRCh37/sampleTree.json +21 -1
  119. package/src/mocks/GRCh37/static.ts +62 -134
  120. package/src/mocks/GRCh37/vcf/family.vcf.blob +9 -3
  121. package/src/mocks/GRCh38/decisionTree.json +52 -33
  122. package/src/mocks/GRCh38/decisionTreeStr.json +572 -0
  123. package/src/mocks/GRCh38/fasta/chr1_149380406-149403321.fasta.gz.blob +0 -0
  124. package/src/mocks/GRCh38/field_metadata.json +435 -95
  125. package/src/mocks/GRCh38/sampleTree.json +175 -0
  126. package/src/mocks/GRCh38/static.ts +101 -42
  127. package/src/mocks/GRCh38/str.cram.blob +0 -0
  128. package/src/mocks/GRCh38/str.cram.crai.blob +0 -0
  129. package/src/mocks/GRCh38/vcf/family.vcf.blob +25 -24
  130. package/src/mocks/GRCh38/vcf/no_vep.vcf.blob +29 -28
  131. package/src/mocks/GRCh38/vcf/samples_0.vcf.blob +28 -27
  132. package/src/mocks/GRCh38/vcf/samples_1.vcf.blob +29 -28
  133. package/src/mocks/GRCh38/vcf/samples_100.vcf.blob +28 -27
  134. package/src/mocks/GRCh38/vcf/str.vcf.blob +321 -0
  135. package/src/mocks/MockApiClient.ts +339 -332
  136. package/src/mocks/config_cram.json +701 -0
  137. package/src/mocks/config_vcf.json +699 -0
  138. package/src/store/app.ts +30 -0
  139. package/src/store/index.tsx +3 -168
  140. package/src/store/variants.ts +182 -0
  141. package/src/types/config.d.ts +190 -0
  142. package/src/types/configCellComposed.d.ts +86 -0
  143. package/src/types/configCells.d.ts +129 -0
  144. package/src/types/configFilter.d.ts +80 -0
  145. package/src/types/configFilterComposed.d.ts +60 -0
  146. package/src/types/configSort.d.ts +13 -0
  147. package/src/types/filter.d.ts +17 -0
  148. package/src/types/store.d.ts +34 -0
  149. package/src/utils/api.ts +281 -0
  150. package/src/utils/config/config.ts +182 -0
  151. package/src/utils/config/configCells.ts +74 -0
  152. package/src/utils/config/configCellsComposed.ts +508 -0
  153. package/src/utils/config/configCellsField.ts +61 -0
  154. package/src/utils/config/configCellsFixed.ts +126 -0
  155. package/src/utils/config/configFilters.ts +46 -0
  156. package/src/utils/config/configFiltersComposed.ts +208 -0
  157. package/src/utils/config/configFiltersField.ts +49 -0
  158. package/src/utils/config/configFiltersFixed.ts +106 -0
  159. package/src/utils/config/configSorts.ts +44 -0
  160. package/src/utils/config/configValidator.ts +380 -0
  161. package/src/utils/config/configVip.ts +25 -0
  162. package/src/utils/csq.ts +115 -0
  163. package/src/utils/decisionTree.ts +45 -0
  164. package/src/utils/download.ts +30 -0
  165. package/src/utils/error.ts +69 -0
  166. package/src/utils/query/query.ts +55 -0
  167. package/src/utils/query/queryFilter.ts +132 -0
  168. package/src/utils/query/queryFilterComposed.ts +247 -0
  169. package/src/utils/query/queryFilterField.ts +75 -0
  170. package/src/utils/query/queryFilterFixed.ts +44 -0
  171. package/src/utils/query/querySample.ts +18 -0
  172. package/src/utils/query/queryVariantType.ts +76 -0
  173. package/src/utils/query/selector.ts +41 -0
  174. package/src/utils/{sortUtils.ts → query/sort.ts} +32 -11
  175. package/src/utils/sample.ts +19 -35
  176. package/src/utils/utils.ts +66 -2
  177. package/src/utils/variantType.ts +43 -0
  178. package/src/utils/vcf.ts +352 -0
  179. package/src/views/Help.tsx +109 -114
  180. package/src/views/Home.tsx +3 -2
  181. package/src/views/Sample.tsx +12 -7
  182. package/src/views/SampleVariant.tsx +23 -112
  183. package/src/views/SampleVariantConsequence.tsx +54 -144
  184. package/src/views/SampleVariants.tsx +33 -445
  185. package/src/views/SampleVariantsRedirect.tsx +20 -0
  186. package/src/views/Samples.tsx +7 -10
  187. package/src/views/Variant.tsx +31 -61
  188. package/src/views/VariantConsequence.tsx +42 -72
  189. package/src/views/Variants.tsx +29 -138
  190. package/src/views/VariantsRedirect.tsx +25 -0
  191. package/src/views/data/data.tsx +32 -6
  192. package/tests/store/variants.test.ts +122 -0
  193. package/tests/utils/config/config.test.ts +167 -0
  194. package/tests/utils/config/configCells.test.ts +86 -0
  195. package/tests/utils/config/configCellsComposed.test.ts +1163 -0
  196. package/tests/utils/config/configCellsField.test.ts +164 -0
  197. package/tests/utils/config/configCellsFixed.test.ts +99 -0
  198. package/tests/utils/config/configFilters.test.ts +80 -0
  199. package/tests/utils/config/configFiltersComposed.test.ts +504 -0
  200. package/tests/utils/config/configFiltersField.test.ts +140 -0
  201. package/tests/utils/config/configFiltersFixed.test.ts +81 -0
  202. package/tests/utils/config/configSorts.test.ts +55 -0
  203. package/tests/utils/config/configValidator.test.ts +56 -0
  204. package/tests/utils/config/configVip.test.ts +53 -0
  205. package/tests/utils/decisionTree.test.ts +71 -0
  206. package/tests/utils/download.test.ts +20 -0
  207. package/tests/utils/query/query.test.ts +84 -0
  208. package/tests/utils/query/queryFilter.test.ts +243 -0
  209. package/tests/utils/query/queryFilterComposed.test.ts +301 -0
  210. package/tests/utils/query/queryFilterField.test.ts +75 -0
  211. package/tests/utils/query/queryFilterFixed.test.ts +86 -0
  212. package/tests/utils/query/querySample.test.ts +45 -0
  213. package/tests/utils/query/queryVariantType.test.ts +56 -0
  214. package/{src/__tests__/sortUtils.test.ts → tests/utils/query/sort.test.ts} +3 -4
  215. package/tests/utils/sample.test.ts +259 -0
  216. package/tests/utils/utils.test.ts +120 -0
  217. package/tests/utils/variantType.test.ts +48 -0
  218. package/tests/utils/vcf.test.ts +649 -0
  219. package/tsconfig.json +6 -2
  220. package/vite.config.mts +20 -3
  221. package/.eslintignore +0 -4
  222. package/.eslintrc.js +0 -23
  223. package/src/Api.ts +0 -12
  224. package/src/__tests__/decisionTreeUtils.test.ts +0 -75
  225. package/src/__tests__/field.test.ts +0 -107
  226. package/src/__tests__/query.test.ts +0 -188
  227. package/src/__tests__/sample.test.ts +0 -184
  228. package/src/__tests__/utils.test.ts +0 -24
  229. package/src/__tests__/viewUtils.test.ts +0 -125
  230. package/src/components/ConsequenceTable.tsx +0 -45
  231. package/src/components/Error.tsx +0 -9
  232. package/src/components/FieldHeader.tsx +0 -26
  233. package/src/components/InfoCollapsablePane.tsx +0 -90
  234. package/src/components/VariantInfoNestedTable.tsx +0 -127
  235. package/src/components/VariantSampleTable.tsx +0 -58
  236. package/src/components/VariantsSampleTable.tsx +0 -184
  237. package/src/components/VariantsTable.tsx +0 -125
  238. package/src/components/filter/FilterAllelicBalance.tsx +0 -81
  239. package/src/components/filter/FilterCategorical.tsx +0 -81
  240. package/src/components/filter/FilterClinVar.tsx +0 -21
  241. package/src/components/filter/FilterGene.tsx +0 -34
  242. package/src/components/filter/FilterHpo.tsx +0 -161
  243. package/src/components/filter/FilterInheritance.tsx +0 -162
  244. package/src/components/filter/FilterIntegerGq.tsx +0 -47
  245. package/src/components/filter/FilterVI.tsx +0 -68
  246. package/src/components/filter/FilterVariantType.tsx +0 -146
  247. package/src/components/filter/Filters.tsx +0 -29
  248. package/src/components/filter/InfoFilter.tsx +0 -39
  249. package/src/components/filter/InfoFilters.tsx +0 -35
  250. package/src/components/filter/SampleFilters.tsx +0 -93
  251. package/src/components/filter/SamplesFilters.tsx +0 -33
  252. package/src/components/record/Allele.tsx +0 -38
  253. package/src/components/record/AlleleBreakend.tsx +0 -5
  254. package/src/components/record/AlleleMissing.tsx +0 -5
  255. package/src/components/record/AlleleNucs.tsx +0 -49
  256. package/src/components/record/AlleleSymbolic.tsx +0 -5
  257. package/src/components/record/Alt.tsx +0 -17
  258. package/src/components/record/Chrom.tsx +0 -5
  259. package/src/components/record/Format.tsx +0 -40
  260. package/src/components/record/Info.tsx +0 -55
  261. package/src/components/record/Pos.tsx +0 -5
  262. package/src/components/record/Qual.tsx +0 -5
  263. package/src/components/record/RecordDownload.tsx +0 -66
  264. package/src/components/record/Ref.tsx +0 -6
  265. package/src/components/record/field/Field.tsx +0 -36
  266. package/src/components/record/field/FieldMultipleValue.tsx +0 -22
  267. package/src/components/record/field/FieldSingleValue.tsx +0 -35
  268. package/src/components/record/info/ClinVar.tsx +0 -81
  269. package/src/components/record/info/Consequence.tsx +0 -18
  270. package/src/components/record/info/Gene.tsx +0 -56
  271. package/src/components/record/info/GnomAD.tsx +0 -54
  272. package/src/components/record/info/Hpo.tsx +0 -52
  273. package/src/components/record/info/InheritanceModes.tsx +0 -22
  274. package/src/components/record/info/VipC.tsx +0 -23
  275. package/src/components/record/info/Vkgl.tsx +0 -42
  276. package/src/mocks/GRCh37/vcf/no_vep.vcf.blob +0 -61
  277. package/src/mocks/GRCh37/vcf/samples_0.vcf.blob +0 -93
  278. package/src/mocks/GRCh37/vcf/samples_1.vcf.blob +0 -93
  279. package/src/mocks/GRCh37/vcf/samples_100.vcf.blob +0 -93
  280. package/src/utils/ApiUtils.ts +0 -263
  281. package/src/utils/csqUtils.ts +0 -27
  282. package/src/utils/decisionTreeUtils.ts +0 -31
  283. package/src/utils/field.ts +0 -49
  284. package/src/utils/query.ts +0 -154
  285. 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/src/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
- sampleTree as sampleTreeGRCh37,
22
- fastaGz as fastaGzGRCh37,
23
- genesGz as genesGzGRCh37,
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
- fastaGz as fastaGzGRCh38,
38
- genesGz as genesGzGRCh38,
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 { Metadata as RecordMetadata, Record } from "@molgenis/vip-report-vcf/src/Vcf";
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 apiClient: Api;
54
- private readonly datasets: { [key: string]: ReportData };
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.datasets = MockApiClient.createDatasets();
58
- this.apiClient = this.createApiClient(this.getDatasetIds()[0]);
74
+ this.dataSetId = MockApiClient.dataSetIds[0]!;
59
75
  }
60
76
 
61
- getFastaGz(contig: string, pos: number): Promise<Uint8Array | null> {
62
- return this.apiClient.getFastaGz(contig, pos);
77
+ async getConfig(): Promise<Json | null> {
78
+ const apiClient = await this.getApiClient();
79
+ return apiClient.getConfig();
63
80
  }
64
81
 
65
- getGenesGz(): Promise<Uint8Array | null> {
66
- return this.apiClient.getGenesGz();
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
- getCram(sampleId: string): Promise<Cram | null> {
70
- return this.apiClient.getCram(sampleId);
87
+ async getGenesGz(): Promise<Uint8Array | null> {
88
+ const apiClient = await this.getApiClient();
89
+ return apiClient.getGenesGz();
71
90
  }
72
91
 
73
- getDecisionTree(): Promise<DecisionTree | null> {
74
- return this.apiClient.getDecisionTree();
92
+ async getCram(sampleId: string): Promise<Cram | null> {
93
+ const apiClient = await this.getApiClient();
94
+ return apiClient.getCram(sampleId);
75
95
  }
76
96
 
77
- getSampleTree(): Promise<DecisionTree | null> {
78
- return this.apiClient.getSampleTree();
97
+ async getDecisionTree(): Promise<DecisionTree | null> {
98
+ const apiClient = await this.getApiClient();
99
+ return apiClient.getDecisionTree();
79
100
  }
80
101
 
81
- getHtsFileMetadata(): Promise<HtsFileMetadata> {
82
- return this.apiClient.getHtsFileMetadata();
102
+ async getSampleTree(): Promise<DecisionTree | null> {
103
+ const apiClient = await this.getApiClient();
104
+ return apiClient.getSampleTree();
83
105
  }
84
106
 
85
- getAppMetadata(): Promise<AppMetadata> {
86
- return this.apiClient.getAppMetadata();
107
+ async getHtsFileMetadata(): Promise<HtsFileMetadata> {
108
+ const apiClient = await this.getApiClient();
109
+ return apiClient.getHtsFileMetadata();
87
110
  }
88
111
 
89
- getPhenotypes(params: Params): Promise<PagedItems<Phenotype>> {
90
- return this.apiClient.getPhenotypes(params);
112
+ async getAppMetadata(): Promise<AppMetadata> {
113
+ const apiClient = await this.getApiClient();
114
+ return apiClient.getAppMetadata();
91
115
  }
92
116
 
93
- getRecordById(id: number): Promise<Item<Record>> {
94
- return this.apiClient.getRecordById(id);
117
+ async getPhenotypes(params: Params): Promise<PagedItems<Phenotype>> {
118
+ const apiClient = await this.getApiClient();
119
+ return apiClient.getPhenotypes(params);
95
120
  }
96
121
 
97
- getRecords(params: Params): Promise<PagedItems<Record>> {
98
- return this.apiClient.getRecords(params);
122
+ async getRecordById(id: number): Promise<Item<VcfRecord>> {
123
+ const apiClient = await this.getApiClient();
124
+ return apiClient.getRecordById(id);
99
125
  }
100
126
 
101
- getRecordsMeta(): Promise<RecordMetadata> {
102
- return this.apiClient.getRecordsMeta();
127
+ async getRecords(params: Params): Promise<PagedItems<VcfRecord>> {
128
+ const apiClient = await this.getApiClient();
129
+ return apiClient.getRecords(params);
103
130
  }
104
131
 
105
- getSampleById(id: number): Promise<Item<Sample>> {
106
- return this.apiClient.getSampleById(id);
132
+ async getRecordsMeta(): Promise<VcfMetadata> {
133
+ const apiClient = await this.getApiClient();
134
+ return apiClient.getRecordsMeta();
107
135
  }
108
136
 
109
- getSamples(params: Params): Promise<PagedItems<Sample>> {
110
- return this.apiClient.getSamples(params);
137
+ async getSampleById(id: number): Promise<Item<Sample>> {
138
+ const apiClient = await this.getApiClient();
139
+ return apiClient.getSampleById(id);
111
140
  }
112
141
 
113
- isDatasetSupport(): boolean {
114
- return true;
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 Object.keys(this.datasets);
148
+ return MockApiClient.dataSetIds;
119
149
  }
120
150
 
121
151
  selectDataset(id: string): void {
122
- this.apiClient = this.createApiClient(id);
152
+ this.dataSetId = id;
153
+ this.apiClient = undefined;
123
154
  }
124
155
 
125
- private static createDatasets() {
126
- const mockReportData: ReportData = {
127
- metadata: {
128
- app: {
129
- name: "vcf-report",
130
- version: "0.0.8",
131
- args: "-i testdata_b37_vip.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
132
- },
133
- htsFile: {
134
- uri: "/path/to/testdata_b37_vip.vcf",
135
- htsFormat: "VCF",
136
- genomeAssembly: "GRCh37",
137
- },
138
- } as Metadata,
139
- data: samplesFamilyGRCh37,
140
- binary: {
141
- vcf: vcfFamilyGRCh37,
142
- fastaGz: fastaGzGRCh37,
143
- genesGz: genesGzGRCh37,
144
- cram: {
145
- Patient: {
146
- cram: cramGRCh37,
147
- crai: craiGRCh37,
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
- decisionTree: decisionTreeGRCh37,
152
- sampleTree: sampleTreeGRCh37,
153
- vcfMeta: vcfMetaGRCh37,
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
- decisionTree: decisionTreeGRCh37,
182
- vcfMeta: vcfMetaGRCh37,
183
- };
184
-
185
- const mockReportData1Sample: ReportData = {
186
- metadata: {
187
- app: {
188
- name: "vcf-report",
189
- version: "0.0.8",
190
- args: "-i testdata_b37_1Sample.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
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
- decisionTree: decisionTreeGRCh37,
211
- vcfMeta: vcfMetaGRCh37,
212
- };
213
-
214
- const mockReportData100Samples: ReportData = {
215
- metadata: {
216
- app: {
217
- name: "vcf-report",
218
- version: "0.0.8",
219
- args: "-i testdata_b37_100Samples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
220
- },
221
- htsFile: {
222
- uri: "testdata_b37_100Samples.vcf",
223
- htsFormat: "VCF",
224
- genomeAssembly: "GRCh37",
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
- decisionTree: decisionTreeGRCh37,
234
- vcfMeta: vcfMetaGRCh37,
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
- decisionTree: decisionTreeGRCh37,
257
- vcfMeta: vcfMetaGRCh37,
258
- };
259
-
260
- const mockReportDataFamilyGRCh38: ReportData = {
261
- metadata: {
262
- app: {
263
- name: "vcf-report",
264
- version: "0.0.8",
265
- args: "-i testdata_b38_vip.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
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
- decisionTree: decisionTreeGRCh38,
286
- vcfMeta: vcfMetaGRCh38,
287
- };
288
-
289
- const mockReportDataNoVepGRCh38: ReportData = {
290
- metadata: {
291
- app: {
292
- name: "vcf-report",
293
- version: "0.0.8",
294
- args: "-i testdata_b38.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
295
- },
296
- htsFile: {
297
- uri: "testdata_b38.vcf",
298
- htsFormat: "VCF",
299
- genomeAssembly: "GRCh38",
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
- decisionTree: decisionTreeGRCh38,
315
- vcfMeta: vcfMetaGRCh38,
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
- decisionTree: decisionTreeGRCh38,
344
- vcfMeta: vcfMetaGRCh38,
345
- };
346
-
347
- const mockReportData100SamplesGRCh38: ReportData = {
348
- metadata: {
349
- app: {
350
- name: "vcf-report",
351
- version: "0.0.8",
352
- args: "-i testdata_b38_100Samples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
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
- decisionTree: decisionTreeGRCh38,
367
- vcfMeta: vcfMetaGRCh38,
368
- };
369
-
370
- const mockReportDataNoSampleGRCh38: ReportData = {
371
- metadata: {
372
- app: {
373
- name: "vcf-report",
374
- version: "0.0.8",
375
- args: "-i testdata_b38_1NoSamples.vcf -t /Users/user/vip-report-template/dist/vip-report-template.html -f",
376
- },
377
- htsFile: {
378
- uri: "testdata_b38_NoSamples.vcf",
379
- htsFormat: "VCF",
380
- genomeAssembly: "GRCh38",
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
- decisionTree: decisionTreeGRCh38,
390
- vcfMeta: vcfMetaGRCh38,
391
- };
392
-
393
- const datasets: { [key: string]: ReportData } = {};
394
- datasets["GRCh37 Family"] = mockReportData;
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
- private createApiClient(id: string): Api {
408
- const reportData = this.datasets[id];
409
- const vcf = parseVcf(new TextDecoder().decode(reportData.binary.vcf), reportData.vcfMeta);
410
- reportData.metadata.records = vcf.metadata;
411
- reportData.data.records = vcf.data;
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
- return new ApiClient(reportData);
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
  }