@molgenis/vip-report-template 7.0.2 → 7.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molgenis/vip-report-template",
3
- "version": "7.0.2",
3
+ "version": "7.0.3",
4
4
  "description": "Report Template for Variant Call Format (VCF) Report Generator",
5
5
  "license": "LGPL-3.0",
6
6
  "devDependencies": {
@@ -49,7 +49,7 @@ export const RecordsTableHeaderCells: Component<{ fieldConfigs: ConfigCells }> =
49
49
  );
50
50
  };
51
51
 
52
- const RecordsTableHeaderCell: Component<{
52
+ export const RecordsTableHeaderCell: Component<{
53
53
  fieldConfig: ConfigCellItem;
54
54
  }> = (props) => {
55
55
  const label = () => props.fieldConfig.label();
@@ -43,7 +43,7 @@ export const VariantConsequenceContainer: Component<{
43
43
  <div class="column is-4">
44
44
  <div>
45
45
  <h1 class="title is-5">Info</h1>
46
- <VariantInfoTable infoMetadataContainer={props.metadata.records.info} infoContainer={props.record.data.n} />
46
+ <VariantInfoTable variantType={props.variantType} metadata={props.metadata} record={props.record} />
47
47
  </div>
48
48
  <div class="mt-3">
49
49
  <h1 class="title is-5">Consequence</h1>
@@ -34,18 +34,10 @@ export const VariantContainer: Component<{
34
34
  <h1 class="title is-5">Record</h1>
35
35
  <VariantTable variant={props.record.data} />
36
36
  </div>
37
- <Show
38
- when={
39
- Object.values(props.metadata.records.info).filter(
40
- (info) => !info.nested && props.record.data.n[info.id] !== undefined,
41
- ).length > 0
42
- }
43
- >
44
- <div class="column is-3">
45
- <h1 class="title is-5">Info</h1>
46
- <VariantInfoTable infoMetadataContainer={props.metadata.records.info} infoContainer={props.record.data.n} />
47
- </div>
48
- </Show>
37
+ <div class="column is-3">
38
+ <h1 class="title is-5">Info</h1>
39
+ <VariantInfoTable variantType={props.variantType} metadata={props.metadata} record={props.record} />
40
+ </div>
49
41
  <Show when={config().variant.samplesCells}>
50
42
  {(samplesCells) => (
51
43
  <div class="column">
@@ -1,27 +1,38 @@
1
1
  import { Component, For } from "solid-js";
2
- import { FieldMetadataContainer, InfoContainer } from "@molgenis/vip-report-vcf";
3
- import { FieldInfo } from "./field/info/FieldInfo.tsx";
2
+ import { VcfRecord } from "@molgenis/vip-report-vcf";
4
3
  import { Table } from "./Table.tsx";
4
+ import { Item } from "@molgenis/vip-report-api";
5
+ import { RecordsTableCell, RecordsTableHeaderCell } from "./RecordsTable.tsx";
6
+ import { initConfigCells } from "../utils/config/configCells.ts";
7
+ import { MetadataContainer } from "../utils/api.ts";
8
+ import { VariantType } from "../utils/variantType.ts";
5
9
 
6
10
  export const VariantInfoTable: Component<{
7
- infoMetadataContainer: FieldMetadataContainer;
8
- infoContainer: InfoContainer;
11
+ variantType: VariantType;
12
+ metadata: MetadataContainer;
13
+ record: Item<VcfRecord>;
9
14
  }> = (props) => {
10
- const fieldMetadatas = () =>
11
- Object.values(props.infoMetadataContainer).filter(
12
- (info) => !info.nested && props.infoContainer[info.id] !== undefined,
13
- );
15
+ const configCells = () =>
16
+ initConfigCells(
17
+ [
18
+ {
19
+ type: "info",
20
+ name: "((?!CSQ).)*",
21
+ },
22
+ ],
23
+ props.variantType,
24
+ props.metadata,
25
+ null,
26
+ ).filter((configCell) => configCell.type !== "group");
14
27
 
15
28
  return (
16
- <Table>
29
+ <Table borderless={true}>
17
30
  <tbody>
18
- <For each={fieldMetadatas()}>
19
- {(fieldMetadata) => (
31
+ <For each={configCells()}>
32
+ {(fieldConfig) => (
20
33
  <tr>
21
- <td>{fieldMetadata.id}</td>
22
- <td>
23
- <FieldInfo metadata={fieldMetadata} value={props.infoContainer[fieldMetadata.id]} />
24
- </td>
34
+ <RecordsTableHeaderCell fieldConfig={fieldConfig} />
35
+ <RecordsTableCell fieldConfig={fieldConfig} record={props.record} />
25
36
  </tr>
26
37
  )}
27
38
  </For>
@@ -180,7 +180,7 @@
180
180
  "label": "ClinVar",
181
181
  "description": "Clinical significance for this single variant",
182
182
  "numberType": "OTHER",
183
- "separator": "/",
183
+ "separator": "&",
184
184
  "type": "CATEGORICAL",
185
185
  "categories": {
186
186
  "Benign": {
@@ -765,8 +765,8 @@
765
765
  "STR_STATUS": {
766
766
  "label": "STR status",
767
767
  "description": "Repeat expansion status as decided by Stranger",
768
- "numberType": "NUMBER",
769
- "numberCount": 1,
768
+ "numberType": "PER_ALT",
769
+ "separator": ",",
770
770
  "type": "CATEGORICAL",
771
771
  "categories": {
772
772
  "normal": {
@@ -203,9 +203,13 @@
203
203
  "label": "P",
204
204
  "description": "Pathogenic"
205
205
  },
206
- "Conflicting_interpretations_of_pathogenicity": {
206
+ "Conflicting_classifications_of_pathogenicity": {
207
207
  "label": "Conflict",
208
- "description": "Conflicting interpretations of pathogenicity"
208
+ "description": "Conflicting classifications of pathogenicity"
209
+ },
210
+ "Other": {
211
+ "label": "Other",
212
+ "description": "Classifications that do not match the common categorical values."
209
213
  }
210
214
  }
211
215
  },
@@ -236,9 +240,9 @@
236
240
  "label": "P",
237
241
  "description": "Pathogenic"
238
242
  },
239
- "Conflicting_interpretations_of_pathogenicity": {
243
+ "Conflicting_classifications_of_pathogenicity": {
240
244
  "label": "Conflict",
241
- "description": "Conflicting interpretations of pathogenicity"
245
+ "description": "Conflicting classifications of pathogenicity"
242
246
  }
243
247
  }
244
248
  },
@@ -273,8 +277,8 @@
273
277
  "label": "Single submitter",
274
278
  "description": "There is a single submitted record with a classification"
275
279
  },
276
- "_conflicting_interpretations": {
277
- "label": "Conflicting_interpretations",
280
+ "_conflicting_classifications": {
281
+ "label": "Conflicting_classifications",
278
282
  "description": "There are conflicting classifications"
279
283
  },
280
284
  "no_assertion_criteria_provided": {
@@ -283,6 +287,15 @@
283
287
  },
284
288
  "no_assertion_provided": {
285
289
  "label": "No assertion provided"
290
+ },
291
+ "no_classification_for_the_single_variant": {
292
+ "label": "No classification for the single variant"
293
+ },
294
+ "no_classification_provided": {
295
+ "label": "No classification provided"
296
+ },
297
+ "no_classifications_from_unflagged_records": {
298
+ "label": "No classifications from unflagged records"
286
299
  }
287
300
  }
288
301
  },
@@ -765,8 +778,8 @@
765
778
  "STR_STATUS": {
766
779
  "label": "STR status",
767
780
  "description": "Repeat expansion status as decided by Stranger",
768
- "numberType": "NUMBER",
769
- "numberCount": 1,
781
+ "numberType": "PER_ALT",
782
+ "separator": ",",
770
783
  "type": "CATEGORICAL",
771
784
  "categories": {
772
785
  "normal": {