@molgenis/vip-report-template 7.1.3 → 8.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.
Files changed (155) hide show
  1. package/.gitattributes +3 -1
  2. package/README.md +13 -0
  3. package/eslint.config.mjs +6 -1
  4. package/package.json +6 -5
  5. package/scripts/validateConfig/README.txt +5 -0
  6. package/scripts/validateConfig/compileValidator.ts +17 -0
  7. package/scripts/validateConfig/createSchema.ts +6 -0
  8. package/scripts/validateConfig/schema.ts +370 -0
  9. package/src/App.tsx +2 -1
  10. package/src/components/DatasetDropdown.tsx +1 -1
  11. package/src/components/GenomeBrowser.tsx +14 -4
  12. package/src/components/RecordsTable.tsx +23 -6
  13. package/src/components/VariantConsequenceContainer.tsx +9 -2
  14. package/src/components/VariantInfoTable.tsx +1 -1
  15. package/src/components/VariantsContainer.tsx +47 -9
  16. package/src/components/VariantsContainerHeader.tsx +1 -8
  17. package/src/components/field/composed/FieldGenotype.tsx +1 -1
  18. package/src/components/field/composed/FieldGenotypeStr.tsx +18 -10
  19. package/src/components/field/composed/FieldGnomAd.tsx +1 -1
  20. package/src/components/field/composed/FieldInheritanceModes.tsx +1 -4
  21. package/src/components/field/composed/FieldVkgl.tsx +1 -1
  22. package/src/components/field/typed/FieldCategorical.tsx +1 -1
  23. package/src/components/field/typed/FieldCharacter.tsx +1 -1
  24. package/src/components/field/typed/FieldFlag.tsx +1 -1
  25. package/src/components/field/typed/FieldFloat.tsx +1 -1
  26. package/src/components/field/typed/FieldInteger.tsx +1 -1
  27. package/src/components/field/typed/FieldString.tsx +1 -1
  28. package/src/components/filter/Filter.tsx +1 -0
  29. package/src/components/filter/composed/FilterAllelicImbalance.tsx +1 -0
  30. package/src/components/filter/composed/FilterComposed.tsx +7 -0
  31. package/src/components/filter/composed/FilterDeNovo.tsx +1 -0
  32. package/src/components/filter/composed/FilterHpo.tsx +1 -0
  33. package/src/components/filter/composed/FilterInheritance.tsx +1 -0
  34. package/src/components/filter/composed/FilterLocus.tsx +17 -3
  35. package/src/components/filter/composed/FilterPick.tsx +30 -0
  36. package/src/components/filter/composed/FilterVipC.tsx +1 -0
  37. package/src/components/filter/composed/FilterVipCS.tsx +1 -0
  38. package/src/components/filter/fixed/FilterFixed.tsx +7 -0
  39. package/src/components/filter/typed/FilterCategorical.tsx +18 -1
  40. package/src/components/filter/typed/FilterFlag.tsx +2 -0
  41. package/src/components/filter/typed/FilterInterval.tsx +29 -1
  42. package/src/components/filter/typed/FilterString.tsx +8 -1
  43. package/src/components/filter/typed/FilterTyped.tsx +1 -0
  44. package/src/components/form/ButtonApply.tsx +6 -2
  45. package/src/mocks/GRCh38/README.txt +15 -0
  46. package/src/mocks/GRCh38/decisionTree.json +201 -0
  47. package/src/mocks/GRCh38/family.ped +6 -0
  48. package/src/mocks/GRCh38/field_metadata.json +36 -11
  49. package/src/mocks/GRCh38/sample1.ped +1 -0
  50. package/src/mocks/GRCh38/static.ts +36 -148
  51. package/src/mocks/GRCh38/str.ped +1 -0
  52. package/src/mocks/GRCh38/vcf/family.db.blob +0 -0
  53. package/src/mocks/GRCh38/vcf/family.vcf +312 -0
  54. package/src/mocks/GRCh38/vcf/fixPaths.sql +7 -0
  55. package/src/mocks/GRCh38/vcf/no_vep.db.blob +0 -0
  56. package/src/mocks/GRCh38/vcf/{no_vep.vcf.blob → no_vep.vcf} +1 -1
  57. package/src/mocks/GRCh38/vcf/samples_0.db.blob +0 -0
  58. package/src/mocks/GRCh38/vcf/samples_1.db.blob +0 -0
  59. package/src/mocks/GRCh38/vcf/samples_100.db.blob +0 -0
  60. package/src/mocks/GRCh38/vcf/{samples_100.vcf.blob → samples_100.vcf} +6 -6
  61. package/src/mocks/GRCh38/vcf/str.db.blob +0 -0
  62. package/src/mocks/GRCh38/vcf/{str.vcf.blob → str.vcf} +17 -17
  63. package/src/mocks/MockApiClient.ts +60 -226
  64. package/src/mocks/config_cram.json +4 -0
  65. package/src/mocks/config_default_values.json +722 -0
  66. package/src/mocks/config_vcf.json +15 -1
  67. package/src/mocks/sql-wasm.wasm.blob +0 -0
  68. package/src/types/config.d.ts +9 -5
  69. package/src/types/configCells.d.ts +1 -0
  70. package/src/types/configFilter.d.ts +1 -0
  71. package/src/types/configFilterComposed.d.ts +3 -0
  72. package/src/utils/api.ts +21 -49
  73. package/src/utils/config/configCellsComposed.ts +1 -1
  74. package/src/utils/config/configCellsField.ts +2 -0
  75. package/src/utils/config/configFiltersComposed.ts +7 -0
  76. package/src/utils/config/configFiltersField.ts +3 -2
  77. package/src/utils/config/configFiltersFixed.ts +7 -0
  78. package/src/utils/config/configValidator.precompiled.ts +83402 -0
  79. package/src/utils/config/configValidator.ts +3 -368
  80. package/src/utils/csq.ts +5 -10
  81. package/src/utils/decisionTree.ts +8 -9
  82. package/src/utils/query/query.ts +3 -2
  83. package/src/utils/query/queryFilter.ts +2 -3
  84. package/src/utils/query/queryFilterComposed.ts +12 -12
  85. package/src/utils/query/queryFilterField.ts +14 -7
  86. package/src/utils/query/queryFilterFixed.ts +5 -5
  87. package/src/utils/query/querySample.ts +15 -4
  88. package/src/utils/query/selector.ts +5 -20
  89. package/src/utils/query/sort.ts +4 -4
  90. package/src/utils/vcf.ts +20 -11
  91. package/src/views/Help.tsx +2 -2
  92. package/src/views/SampleVariant.tsx +4 -1
  93. package/src/views/Samples.tsx +10 -3
  94. package/src/views/data/data.tsx +2 -2
  95. package/tests/utils/config/configFiltersComposed.test.ts +2 -0
  96. package/tests/utils/config/configFiltersField.test.ts +4 -2
  97. package/tests/utils/config/configFiltersFixed.test.ts +23 -6
  98. package/tests/utils/query/query.test.ts +34 -6
  99. package/tests/utils/query/queryFilter.test.ts +4 -31
  100. package/tests/utils/query/queryFilterComposed.test.ts +13 -13
  101. package/tests/utils/query/queryFilterField.test.ts +5 -5
  102. package/tests/utils/query/queryFilterFixed.test.ts +5 -5
  103. package/tests/utils/query/querySample.test.ts +50 -10
  104. package/tests/utils/query/sort.test.ts +1 -1
  105. package/tests/utils/vcf.test.ts +1 -0
  106. package/vite.config.mts +2 -1
  107. package/src/mocks/GRCh37/alignment.cram.blob +0 -0
  108. package/src/mocks/GRCh37/alignment.cram.crai.blob +0 -0
  109. package/src/mocks/GRCh37/decisionTree.json +0 -355
  110. package/src/mocks/GRCh37/fasta/1-10042288-10042788.fasta.gz.blob +0 -0
  111. package/src/mocks/GRCh37/fasta/1-152520538-152521038.fasta.gz.blob +0 -0
  112. package/src/mocks/GRCh37/fasta/1-16375333-16375833.fasta.gz.blob +0 -0
  113. package/src/mocks/GRCh37/fasta/1-16376162-16376662.fasta.gz.blob +0 -0
  114. package/src/mocks/GRCh37/fasta/1-17348965-17349469.fasta.gz.blob +0 -0
  115. package/src/mocks/GRCh37/fasta/1-17348969-17349469.fasta.gz.blob +0 -0
  116. package/src/mocks/GRCh37/fasta/1-17354844-17355344.fasta.gz.blob +0 -0
  117. package/src/mocks/GRCh37/fasta/10-126091249-126091749.fasta.gz.blob +0 -0
  118. package/src/mocks/GRCh37/fasta/11-134013975-134014475.fasta.gz.blob +0 -0
  119. package/src/mocks/GRCh37/fasta/13-77569878-77570378.fasta.gz.blob +0 -0
  120. package/src/mocks/GRCh37/fasta/14-105167610-105168110.fasta.gz.blob +0 -0
  121. package/src/mocks/GRCh37/fasta/14-89307588-89308088.fasta.gz.blob +0 -0
  122. package/src/mocks/GRCh37/fasta/14-89309945-89310445.fasta.gz.blob +0 -0
  123. package/src/mocks/GRCh37/fasta/14-89336157-89336657.fasta.gz.blob +0 -0
  124. package/src/mocks/GRCh37/fasta/17-29555814-29556314.fasta.gz.blob +0 -0
  125. package/src/mocks/GRCh37/fasta/17-29585172-29585672.fasta.gz.blob +0 -0
  126. package/src/mocks/GRCh37/fasta/17-29663629-29664129.fasta.gz.blob +0 -0
  127. package/src/mocks/GRCh37/fasta/17-29675976-29676476.fasta.gz.blob +0 -0
  128. package/src/mocks/GRCh37/fasta/17-29683733-29684233.fasta.gz.blob +0 -0
  129. package/src/mocks/GRCh37/fasta/19-11215896-11216396.fasta.gz.blob +0 -0
  130. package/src/mocks/GRCh37/fasta/19-11223801-11224301.fasta.gz.blob +0 -0
  131. package/src/mocks/GRCh37/fasta/19-17449149-17449649.fasta.gz.blob +0 -0
  132. package/src/mocks/GRCh37/fasta/19-17451747-17452247.fasta.gz.blob +0 -0
  133. package/src/mocks/GRCh37/fasta/2-47635417-47635917.fasta.gz.blob +0 -0
  134. package/src/mocks/GRCh37/fasta/20-62326742-62327242.fasta.gz.blob +0 -0
  135. package/src/mocks/GRCh37/fasta/22-50627343-50627843.fasta.gz.blob +0 -0
  136. package/src/mocks/GRCh37/fasta/22-50721296-50721796.fasta.gz.blob +0 -0
  137. package/src/mocks/GRCh37/fasta/4-106320044-106320544.fasta.gz.blob +0 -0
  138. package/src/mocks/GRCh37/fasta/7-42017061-42017561.fasta.gz.blob +0 -0
  139. package/src/mocks/GRCh37/fasta/7-42064707-42065207.fasta.gz.blob +0 -0
  140. package/src/mocks/GRCh37/fasta/8-145140250-145140750.fasta.gz.blob +0 -0
  141. package/src/mocks/GRCh37/fasta/8-61764893-61765393.fasta.gz.blob +0 -0
  142. package/src/mocks/GRCh37/fasta/9-107546383-107546883.fasta.gz.blob +0 -0
  143. package/src/mocks/GRCh37/fasta/9-107584614-107585114.fasta.gz.blob +0 -0
  144. package/src/mocks/GRCh37/fasta/MT-15076-15576.fasta.gz.blob +0 -0
  145. package/src/mocks/GRCh37/fasta/X-48932771-48933271.fasta.gz.blob +0 -0
  146. package/src/mocks/GRCh37/fasta/Y-2655391-2655891.fasta.gz.blob +0 -0
  147. package/src/mocks/GRCh37/field_metadata.json +0 -794
  148. package/src/mocks/GRCh37/genes.gff.gz.blob +0 -0
  149. package/src/mocks/GRCh37/sampleTree.json +0 -143
  150. package/src/mocks/GRCh37/static.ts +0 -189
  151. package/src/mocks/GRCh37/vcf/family.vcf.blob +0 -134
  152. package/src/mocks/GRCh38/vcf/family.vcf.blob +0 -272
  153. package/src/mocks/static.ts +0 -1636
  154. /package/src/mocks/GRCh38/vcf/{samples_0.vcf.blob → samples_0.vcf} +0 -0
  155. /package/src/mocks/GRCh38/vcf/{samples_1.vcf.blob → samples_1.vcf} +0 -0
@@ -4,52 +4,33 @@ import {
4
4
  AppMetadata,
5
5
  Cram,
6
6
  DecisionTree,
7
- HtsFileMetadata,
8
7
  Item,
9
8
  Json,
10
- Metadata,
11
9
  PagedItems,
12
10
  Params,
13
11
  Phenotype,
14
12
  ReportData,
15
13
  Sample,
16
14
  } 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";
20
- import { samples1, samples100 } from "./static";
15
+ import { VcfMetadata, VcfRecord } from "@molgenis/vip-report-vcf";
21
16
  import {
22
- decisionTree as decisionTreeGRCh37,
23
- fetchCrai as fetchCraiGRCh37,
24
- fetchCram as fetchCramGRCh37,
25
- fetchFastaGz as fetchFastaGzGRCh37,
26
- fetchGenesGz as fetchGenesGzGRCh37,
27
- fetchVcfFamily as fetchVcfFamilyGRCh37,
28
- samplesFamily as samplesFamilyGRCh37,
29
- sampleTree as sampleTreeGRCh37,
30
- vcfMeta as vcfMetaGRCh37,
31
- } from "./GRCh37/static";
32
- import {
33
- decisionTree as decisionTreeGRCh38,
34
- decisionTreeStr as decisionTreeStrGRCh38,
35
17
  fetchCrai as fetchCraiGRCh38,
36
18
  fetchCram as fetchCramGRCh38,
19
+ fetchDatabaseFamily,
20
+ fetchDatabaseNoVep,
21
+ fetchDatabaseSamples0,
22
+ fetchDatabaseSamples1,
23
+ fetchDatabaseSamples100,
24
+ fetchDatabaseStr,
37
25
  fetchFastaGz as fetchFastaGzGRCh38,
38
26
  fetchGenesGz as fetchGenesGzGRCh38,
39
27
  fetchStrCrai as fetchStrCraiGRCh38,
40
28
  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,
47
- samplesFamily as samplesFamilyGRCh38,
48
- samplesStr,
49
- sampleTree as sampleTreeGRCh38,
50
- vcfMeta as vcfMetaGRCh38,
29
+ fetchSqlWasm,
51
30
  } from "./GRCh38/static";
52
31
  import AsyncLock from "async-lock";
32
+ import initSqlJs from "sql.js";
33
+ import { ReportDatabase } from "@molgenis/vip-report-api";
53
34
 
54
35
  const lock = new AsyncLock();
55
36
 
@@ -58,7 +39,6 @@ const lock = new AsyncLock();
58
39
  */
59
40
  export class MockApiClient implements Api {
60
41
  private static dataSetIds = [
61
- "GRCh37 Family",
62
42
  "GRCh38 Family",
63
43
  "GRCh38 Family no VEP",
64
44
  "GRCh38 Samples 0",
@@ -74,6 +54,11 @@ export class MockApiClient implements Api {
74
54
  this.dataSetId = MockApiClient.dataSetIds[0]!;
75
55
  }
76
56
 
57
+ async getInfoOrder() {
58
+ const apiClient = await this.getApiClient();
59
+ return apiClient.getInfoOrder();
60
+ }
61
+
77
62
  async getConfig(): Promise<Json | null> {
78
63
  const apiClient = await this.getApiClient();
79
64
  return apiClient.getConfig();
@@ -104,11 +89,6 @@ export class MockApiClient implements Api {
104
89
  return apiClient.getSampleTree();
105
90
  }
106
91
 
107
- async getHtsFileMetadata(): Promise<HtsFileMetadata> {
108
- const apiClient = await this.getApiClient();
109
- return apiClient.getHtsFileMetadata();
110
- }
111
-
112
92
  async getAppMetadata(): Promise<AppMetadata> {
113
93
  const apiClient = await this.getApiClient();
114
94
  return apiClient.getAppMetadata();
@@ -119,9 +99,9 @@ export class MockApiClient implements Api {
119
99
  return apiClient.getPhenotypes(params);
120
100
  }
121
101
 
122
- async getRecordById(id: number): Promise<Item<VcfRecord>> {
102
+ async getRecordById(id: number, sampleIds: number[] | undefined): Promise<Item<VcfRecord>> {
123
103
  const apiClient = await this.getApiClient();
124
- return apiClient.getRecordById(id);
104
+ return apiClient.getRecordById(id, sampleIds);
125
105
  }
126
106
 
127
107
  async getRecords(params: Params): Promise<PagedItems<VcfRecord>> {
@@ -170,9 +150,6 @@ export class MockApiClient implements Api {
170
150
  async function createApiClient(id: string): Promise<Api> {
171
151
  let reportData: ReportData;
172
152
  switch (id) {
173
- case "GRCh37 Family":
174
- reportData = await fetchReportDataGRCh37Family();
175
- break;
176
153
  case "GRCh38 Family":
177
154
  reportData = await fetchReportDataGRCh38Family();
178
155
  break;
@@ -195,228 +172,85 @@ async function createApiClient(id: string): Promise<Api> {
195
172
  throw new Error(`unknown dataset id '${id}'`);
196
173
  }
197
174
 
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",
213
- },
214
- htsFile: {
215
- uri: "/path/to/testdata_b37_vip.vcf",
216
- htsFormat: "VCF",
217
- genomeAssembly: "GRCh37",
218
- },
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(),
229
- },
230
- },
231
- },
232
- decisionTree: decisionTreeGRCh37,
233
- sampleTree: sampleTreeGRCh37,
234
- vcfMeta: vcfMetaGRCh37,
235
- };
175
+ const SQL = await initSqlJs({ wasmBinary: reportData.wasmBinary!.buffer as ArrayBuffer });
176
+ const reportDatabase = new ReportDatabase(new SQL.Database(reportData.database));
177
+ return new ApiClient(reportDatabase, reportData);
236
178
  }
237
179
 
238
180
  async function fetchReportDataGRCh38Family(): Promise<ReportData> {
239
181
  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",
246
- },
247
- htsFile: {
248
- uri: "testdata_b38_vip.vcf",
249
- htsFormat: "VCF",
250
- genomeAssembly: "GRCh38",
251
- },
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(),
262
- },
182
+ database: await fetchDatabaseFamily(),
183
+ fastaGz: await fetchFastaGzGRCh38(),
184
+ genesGz: await fetchGenesGzGRCh38(),
185
+ cram: {
186
+ Patient: {
187
+ cram: await fetchCramGRCh38(),
188
+ crai: await fetchCraiGRCh38(),
263
189
  },
264
190
  },
265
- decisionTree: decisionTreeGRCh38,
266
- sampleTree: sampleTreeGRCh38,
267
- vcfMeta: vcfMetaGRCh38,
191
+ wasmBinary: await fetchSqlWasm(),
268
192
  };
269
193
  }
270
194
 
271
195
  async function fetchReportDataGRCh38FamilyNoVep() {
272
196
  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",
279
- },
280
- htsFile: {
281
- uri: "testdata_b38.vcf",
282
- htsFormat: "VCF",
283
- genomeAssembly: "GRCh38",
284
- },
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(),
295
- },
197
+ database: await fetchDatabaseNoVep(),
198
+ fastaGz: await fetchFastaGzGRCh38(),
199
+ genesGz: await fetchGenesGzGRCh38(),
200
+ cram: {
201
+ Patient: {
202
+ cram: await fetchCramGRCh38(),
203
+ crai: await fetchCraiGRCh38(),
296
204
  },
297
205
  },
298
- decisionTree: decisionTreeGRCh38,
299
- sampleTree: sampleTreeGRCh38,
300
- vcfMeta: vcfMetaGRCh38,
206
+ wasmBinary: await fetchSqlWasm(),
301
207
  };
302
208
  }
303
209
 
304
210
  async function fetchReportDataGRCh38Data1Sample(): Promise<ReportData> {
305
211
  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(),
328
- },
212
+ database: await fetchDatabaseSamples1(),
213
+ fastaGz: await fetchFastaGzGRCh38(),
214
+ genesGz: await fetchGenesGzGRCh38(),
215
+ cram: {
216
+ SAMPLE1: {
217
+ cram: await fetchCramGRCh38(),
218
+ crai: await fetchCraiGRCh38(),
329
219
  },
330
220
  },
331
- decisionTree: decisionTreeGRCh38,
332
- sampleTree: sampleTreeGRCh38,
333
- vcfMeta: vcfMetaGRCh38,
221
+ wasmBinary: await fetchSqlWasm(),
334
222
  };
335
223
  }
336
224
 
337
225
  async function fetchReportDataGRCh38Data100Samples(): Promise<ReportData> {
338
226
  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,
227
+ database: await fetchDatabaseSamples100(),
228
+ fastaGz: await fetchFastaGzGRCh38(),
229
+ genesGz: await fetchGenesGzGRCh38(),
230
+ wasmBinary: await fetchSqlWasm(),
361
231
  };
362
232
  }
363
233
 
364
234
  async function fetchReportDataGRCh38Str(): Promise<ReportData> {
365
235
  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
- },
236
+ database: await fetchDatabaseStr(),
237
+ fastaGz: await fetchFastaGzGRCh38(),
238
+ genesGz: await fetchGenesGzGRCh38(),
239
+ cram: {
240
+ Patient: {
241
+ cram: await fetchStrCramGRCh38(),
242
+ crai: await fetchStrCraiGRCh38(),
389
243
  },
390
244
  },
391
- decisionTree: decisionTreeStrGRCh38,
392
- sampleTree: sampleTreeGRCh38,
393
- vcfMeta: vcfMetaGRCh38,
245
+ wasmBinary: await fetchSqlWasm(),
394
246
  };
395
247
  }
396
248
 
397
249
  async function fetchReportDataGRCh38NoSample(): Promise<ReportData> {
398
250
  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,
251
+ database: await fetchDatabaseSamples0(),
252
+ fastaGz: await fetchFastaGzGRCh38(),
253
+ genesGz: await fetchGenesGzGRCh38(),
254
+ wasmBinary: await fetchSqlWasm(),
421
255
  };
422
256
  }
@@ -471,6 +471,10 @@
471
471
  "type": "info",
472
472
  "name": "CSQ/SYMBOL"
473
473
  },
474
+ {
475
+ "type": "info",
476
+ "name": "CSQ/PICK"
477
+ },
474
478
  {
475
479
  "type": "composed",
476
480
  "name": "hpo",