Skip to content

Commit

Permalink
Merge pull request #7 from molgenis/fix/clinvar
Browse files Browse the repository at this point in the history
feat:clinVar_CLNSIGINCL metadata
  • Loading branch information
bartcharbon authored Jun 23, 2022
2 parents fd9a445 + b1c364e commit 7f2f4c6
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@molgenis/vip-report-vcf",
"version": "1.2.0",
"version": "1.2.1",
"description": "TypeScript VCF library with support for both reading and writing",
"scripts": {
"build": "tsc --build",
Expand Down
26 changes: 20 additions & 6 deletions src/VepMetadataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,29 @@ function parseVepInfoMetadata(infoMetadata: InfoMetadata, token: string): InfoMe
case "clinVar":
label = "ClinVar ID";
description = "ClinVar Variation ID";
numberType = "NUMBER";
numberCount = 1;
numberType = "OTHER";
type = "INTEGER";
break;
case "clinVar_CLNSIG":
label = "ClinVar";
description = "ClinVar classification(s)";
label = "ClinVar variant";
description = "Clinical significance for this single variant";
numberType = "OTHER";
separator = "/";
separator = "&";
type = "CATEGORICAL";
categories = [
"Benign",
"Likely_benign",
"Uncertain_significance",
"Likely_pathogenic",
"Pathogenic",
"Conflicting_interpretations_of_pathogenicity",
];
break;
case "clinVar_CLNSIGINCL":
label = "ClinVar variant combination";
description = "Clinical significance for a haplotype or genotype that includes this variant";
numberType = "OTHER";
separator = "&";
type = "CATEGORICAL";
categories = [
"Benign",
Expand All @@ -88,7 +102,7 @@ function parseVepInfoMetadata(infoMetadata: InfoMetadata, token: string): InfoMe
label = "ClinVar status";
description = "ClinVar review status";
numberType = "OTHER";
separator = ",";
separator = "&";
type = "CATEGORICAL";
categories = [
"practice_guideline",
Expand Down
51 changes: 37 additions & 14 deletions src/__tests__/VepMetadataParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const vepInfoMetadata: InfoMetadata = {
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
};

Expand Down Expand Up @@ -52,7 +52,7 @@ test("create vep metadata", () => {
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
label: "Effect",
Expand All @@ -67,7 +67,7 @@ test("create vep metadata", () => {
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
},
Expand All @@ -80,7 +80,7 @@ test("create vep metadata", () => {
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
},
Expand All @@ -93,7 +93,7 @@ test("create vep metadata", () => {
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
label: "gnomAD AF",
Expand All @@ -108,35 +108,58 @@ test("create vep metadata", () => {
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
},
{
id: "clinVar",
number: { type: "NUMBER", count: 1 },
number: { type: "OTHER" },
type: "INTEGER",
parent: {
id: "CSQ",
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
label: "ClinVar ID",
description: "ClinVar Variation ID",
},
{
id: "clinVar_CLNSIG",
number: { type: "OTHER", separator: "/" },
number: { type: "OTHER", separator: "&" },
type: "CATEGORICAL",
parent: {
id: "CSQ",
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
categories: [
"Benign",
"Likely_benign",
"Uncertain_significance",
"Likely_pathogenic",
"Pathogenic",
"Conflicting_interpretations_of_pathogenicity",
],
label: "ClinVar variant",
description: "Clinical significance for this single variant",
},
{
id: "clinVar_CLNSIGINCL",
number: { type: "OTHER", separator: "&" },
type: "CATEGORICAL",
parent: {
id: "CSQ",
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
categories: [
Expand All @@ -147,19 +170,19 @@ test("create vep metadata", () => {
"Pathogenic",
"Conflicting_interpretations_of_pathogenicity",
],
label: "ClinVar",
description: "ClinVar classification(s)",
label: "ClinVar variant combination",
description: "Clinical significance for a haplotype or genotype that includes this variant",
},
{
id: "clinVar_CLNREVSTAT",
number: { type: "OTHER", separator: "," },
number: { type: "OTHER", separator: "&" },
type: "CATEGORICAL",
parent: {
id: "CSQ",
number: { type: "OTHER", separator: "|" },
type: "STRING",
description:
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNREVSTAT",
"Consequence annotations from Ensembl VEP. Format: Consequence|PHENO|STRAND|gnomAD_AF|X|clinVar|clinVar_CLNSIG|clinVar_CLNSIGINCL|clinVar_CLNREVSTAT",
required: true,
},
categories: [
Expand Down

0 comments on commit 7f2f4c6

Please sign in to comment.