From 89c5361c9b8191dd0cefc74140afc35b2e01a70a Mon Sep 17 00:00:00 2001 From: gromdimon Date: Tue, 19 Sep 2023 13:33:25 +0200 Subject: [PATCH] feat: new acmg criteria structure --- .../src/components/ACMG/acmgInterfaces.ts | 373 ++++++++++++ .../components/VariantDetails/AcmgRating.vue | 532 +++--------------- frontend/src/stores/variantAcmgRating.ts | 10 +- 3 files changed, 443 insertions(+), 472 deletions(-) create mode 100644 frontend/src/components/ACMG/acmgInterfaces.ts diff --git a/frontend/src/components/ACMG/acmgInterfaces.ts b/frontend/src/components/ACMG/acmgInterfaces.ts new file mode 100644 index 00000000..57430e03 --- /dev/null +++ b/frontend/src/components/ACMG/acmgInterfaces.ts @@ -0,0 +1,373 @@ +interface CriteriaDescType { + id: string + label: string + hint: string +} + +const CriteriaDefinitions: Record = { + pvs1: { + id: 'pvs1', + label: 'PVS1', + hint: 'null variant' + }, + ps1: { + id: 'ps1', + label: 'PS1', + hint: 'same amino acid change' + }, + ps2: { + id: 'ps2', + label: 'PS2', + hint: 'de novo (both maternity and paternity confirmed)' + }, + ps3: { + id: 'ps3', + label: 'PS3', + hint: 'well-established in vitro or in vivo functional studies' + }, + ps4: { + id: 'ps4', + label: 'PS4', + hint: 'prevalence in disease controls' + }, + pm1: { + id: 'pm1', + label: 'PM1', + hint: 'variant in hotspot (missense)' + }, + pm2: { + id: 'pm2', + label: 'PM2', + hint: 'absent from controls (or at extremely low frequency if recessive)' + }, + pm3: { + id: 'pm3', + label: 'PM3', + hint: 'AR: trans with known pathogenic' + }, + pm4: { + id: 'pm4', + label: 'PM4', + hint: 'protein length change' + }, + pm5: { + id: 'pm5', + label: 'PM5', + hint: 'literature: AA exchange same pos' + }, + pm6: { + id: 'pm6', + label: 'PM6', + hint: 'assumed de novo' + }, + pp1: { + id: 'pp1', + label: 'PP1', + hint: 'cosegregates in family' + }, + pp2: { + id: 'pp2', + label: 'PP2', + hint: 'few missense in gene' + }, + pp3: { + id: 'pp3', + label: 'PP3', + hint: 'predicted pathogenic' + }, + pp4: { + id: 'pp4', + label: 'PP4', + hint: 'phenotype/pedigree match gene' + }, + pp5: { + id: 'pp5', + label: 'PP5', + hint: 'reliable source: pathogenic' + }, + ba1: { + id: 'ba1', + label: 'BA1', + hint: 'AF > 5% in ExAC, 1000G, or ESP' + }, + bs1: { + id: 'bs1', + label: 'BS1', + hint: 'disease: allele freq. too high' + }, + bs2: { + id: 'bs2', + label: 'BS2', + hint: 'observed in healthy individual' + }, + bs3: { + id: 'bs3', + label: 'BS3', + hint: 'functional studies: benign' + }, + bs4: { + id: 'bs4', + label: 'BS4', + hint: 'lack of segregation' + }, + bp1: { + id: 'bp1', + label: 'BP1', + hint: 'missense in gene with truncating' + }, + bp2: { + id: 'bp2', + label: 'BP2', + hint: 'other variant is causative' + }, + bp3: { + id: 'bp3', + label: 'BP3', + hint: 'in-frame indel' + }, + bp4: { + id: 'bp4', + label: 'BP4', + hint: 'prediction: benign' + }, + bp5: { + id: 'bp5', + label: 'BP5', + hint: 'different gene in other case' + }, + bp6: { + id: 'bp6', + label: 'BP6', + hint: 'reputable source: benign' + }, + bp7: { + id: 'bp7', + label: 'BP7', + hint: 'silent, no splicing/conservation' + } +} + +enum AcmgEvidenceLevel { + PVS = 8, + PS = 4, + PM = 2, + PP = 1, + BA = -8, + BS = -4, + BP = -2 +} + +interface CriteriaStateType { + id: string + active: boolean + evidence: AcmgEvidenceLevel + description: string +} + +const CriteriaState: Record = { + pvs1: { + id: 'pvs1', + active: false, + evidence: AcmgEvidenceLevel.PVS, + description: + 'Null variant (nonsense, frameshift, canonical ±1 or 2 splice sites, initiation codon, single or multi-exon deletion) in a gene where LOF is a known mechanism of disease' + }, + ps1: { + id: 'ps1', + active: false, + evidence: AcmgEvidenceLevel.PS, + description: + 'Same amino acid change as a previously established pathogenic variant regardless of nucleotide change' + }, + ps2: { + id: 'ps2', + active: false, + evidence: AcmgEvidenceLevel.PS, + description: + 'De novo (both maternity and paternity confirmed) in a patient with the disease and no family history' + }, + ps3: { + id: 'ps3', + active: false, + evidence: AcmgEvidenceLevel.PS, + description: + 'Well-established in vitro or in vivo functional studies supportive of a damaging effect on the gene or gene product' + }, + ps4: { + id: 'ps4', + active: false, + evidence: AcmgEvidenceLevel.PS, + description: + 'The prevalence of the variant in affected individuals is significantly increased compared with the prevalence in controls' + }, + pm1: { + id: 'pm1', + active: false, + evidence: AcmgEvidenceLevel.PM, + description: + 'Located in a mutational hot spot and/or critical and well-established functional domain (e.g., active site of an enzyme) without benign variation' + }, + pm2: { + id: 'pm2', + active: false, + evidence: AcmgEvidenceLevel.PM, + description: + 'Absent from controls (or at extremely low frequency if recessive) in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium' + }, + pm3: { + id: 'pm3', + active: false, + evidence: AcmgEvidenceLevel.PM, + description: 'For recessive disorders, detected in trans with a pathogenic variant' + }, + pm4: { + id: 'pm4', + active: false, + evidence: AcmgEvidenceLevel.PM, + description: + 'Protein length changes as a result of in-frame deletions/insertions in a nonrepeat region or stop-loss variants' + }, + pm5: { + id: 'pm5', + active: false, + evidence: AcmgEvidenceLevel.PM, + description: + 'Novel missense change at an amino acid residue where a different missense change determined to be pathogenic has been seen before' + }, + pm6: { + id: 'pm6', + active: false, + evidence: AcmgEvidenceLevel.PM, + description: 'Assumed de novo, but without confirmation of paternity and maternity' + }, + pp1: { + id: 'pp1', + active: false, + evidence: AcmgEvidenceLevel.PP, + description: + 'Cosegregation with disease in multiple affected family members in a gene definitively known to cause the disease' + }, + pp2: { + id: 'pp2', + active: false, + evidence: AcmgEvidenceLevel.PP, + description: + 'Missense variant in a gene that has a low rate of benign missense variation and in which missense variants are a common mechanism of disease' + }, + pp3: { + id: 'pp3', + active: false, + evidence: AcmgEvidenceLevel.PP, + description: + 'Multiple lines of computational evidence support a deleterious effect on the gene or gene product (conservation, evolutionary, splicing impact, etc.)' + }, + pp4: { + id: 'pp4', + active: false, + evidence: AcmgEvidenceLevel.PP, + description: + "Patient's phenotype or family history is highly specific for a disease with a single genetic etiology" + }, + pp5: { + id: 'pp5', + active: false, + evidence: AcmgEvidenceLevel.PP, + description: + 'Reputable source recently reports variant as pathogenic, but the evidence is not available to the laboratoryto perform an independent evaluation' + }, + ba1: { + id: 'ba1', + active: false, + evidence: AcmgEvidenceLevel.BA, + description: + 'Allele frequency is >5% in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium' + }, + bs1: { + id: 'bs1', + active: false, + evidence: AcmgEvidenceLevel.BS, + description: 'Allele frequency is greater than expected for disorder' + }, + bs2: { + id: 'bs2', + active: false, + evidence: AcmgEvidenceLevel.BS, + description: + 'Observed in a healthy adult individual for a recessive (homozygous), dominant (heterozygous), or X-linked (hemizygous) disorder, with full penetrance expected at an early age' + }, + bs3: { + id: 'bs3', + active: false, + evidence: AcmgEvidenceLevel.BS, + description: + 'Well-established in vitro or in vivo functional studies show no damaging effect on protein function or splicing' + }, + bs4: { + id: 'bs4', + active: false, + evidence: AcmgEvidenceLevel.BS, + description: 'Lack of segregation in affected members of a family' + }, + bp1: { + id: 'bp1', + active: false, + evidence: AcmgEvidenceLevel.BP, + description: + 'Missense variant in a gene for which primarily truncating variants are known to cause disease' + }, + bp2: { + id: 'bp2', + active: false, + evidence: AcmgEvidenceLevel.BP, + description: + 'Observed in trans with a pathogenic variant for a fully penetrant dominant gene/disorder or observed in cis with a pathogenic variant in any inheritance pattern' + }, + bp3: { + id: 'bp3', + active: false, + evidence: AcmgEvidenceLevel.BP, + description: 'In-frame deletions/insertions in a repetitive region without a known function' + }, + bp4: { + id: 'bp4', + active: false, + evidence: AcmgEvidenceLevel.BP, + description: + 'Multiple lines of computational evidence suggest no impact on gene or gene product (conservation, evolutionary,splicing impact, etc.)' + }, + bp5: { + id: 'bp5', + active: false, + evidence: AcmgEvidenceLevel.BP, + description: 'Variant found in a case with an alternate molecular basis for disease' + }, + bp6: { + id: 'bp6', + active: false, + evidence: AcmgEvidenceLevel.BP, + description: + 'Reputable source recently reports variant as benign, but the evidence is not available to the laboratory to perform an independent evaluation' + }, + bp7: { + id: 'bp7', + active: false, + evidence: AcmgEvidenceLevel.BP, + description: + 'A synonymous (silent) variant for which splicing prediction algorithms predict no impact to the splice consensus sequence nor the creation of a new splice site AND the nucleotide is not highly conserved' + } +} + +const ACMGRanking = { + default: { ...CriteriaState }, + interVar: { ...CriteriaState }, + userSelected: { ...CriteriaState } +} + +export { + type CriteriaDescType, + CriteriaDefinitions, + AcmgEvidenceLevel, + type CriteriaStateType, + CriteriaState, + ACMGRanking +} diff --git a/frontend/src/components/VariantDetails/AcmgRating.vue b/frontend/src/components/VariantDetails/AcmgRating.vue index 628252e2..ed44d80c 100644 --- a/frontend/src/components/VariantDetails/AcmgRating.vue +++ b/frontend/src/components/VariantDetails/AcmgRating.vue @@ -3,8 +3,7 @@ import { computed, onMounted, ref, watch } from 'vue' import { StoreState } from '@/stores/misc' import { useVariantAcmgRatingStore } from '@/stores/variantAcmgRating' - -// Defining props and store +import { ACMGRanking } from '@/components/ACMG/acmgInterfaces' const props = defineProps({ smallVariant: Object @@ -12,8 +11,6 @@ const props = defineProps({ const acmgRatingStore = useVariantAcmgRatingStore() -// Defining data - const ScoreExplanation = { 1: 'Benign', 2: 'Likely benign', @@ -22,320 +19,6 @@ const ScoreExplanation = { 5: 'Pathogenic' } -const ACMGRankingScores = { - PVS: { - name: 'Very Strong', - score: 8 - }, - PS: { - name: 'Strong', - score: 4 - }, - PM: { - name: 'Moderate', - score: 2 - }, - PP: { - name: 'Supporting', - score: 1 - }, - BA: { - name: 'Stand alone', - score: -8 - }, - BS: { - name: 'Strong', - score: -4 - }, - BP: { - name: 'Supporting', - score: -2 - } -} - -const acmgRating = { - pathogenic: { - pvs1: { - name: 'PVS1', - id: 'pvs1', - description: - 'Null variant (nonsense, frameshift, canonical ±1 or 2 splice sites, initiation codon, single or multi-exon deletion) in a gene where LOF is a known mechanism of disease', - hint: 'null variant', - score: ACMGRankingScores.PVS, - scoreCustom: null, - active: false - }, - ps1: { - name: 'PS1', - id: 'ps1', - description: - 'Same amino acid change as a previously established pathogenic variant regardless of nucleotide change', - hint: 'literature: this AA exchange', - score: ACMGRankingScores.PS, - scoreCustom: null, - active: false - }, - ps2: { - name: 'PS2', - id: 'ps2', - description: - 'De novo (both maternity and paternity confirmed) in a patient with the disease and no family history', - hint: 'confirmed de novo', - score: ACMGRankingScores.PS, - scoreCustom: null, - active: false - }, - ps3: { - name: 'PS3', - id: 'ps3', - description: - 'Well-established in vitro or in vivo functional studies supportive of a damaging effect on the gene or gene product', - hint: 'supported by functional studies', - score: ACMGRankingScores.PS, - scoreCustom: null, - active: false - }, - ps4: { - name: 'PS4', - id: 'ps4', - description: - 'The prevalence of the variant in affected individuals is significantly increased compared with the prevalence in controls', - hint: 'prevalende in disease controls', - score: ACMGRankingScores.PS, - scoreCustom: null, - active: false - }, - pm1: { - name: 'PM1', - id: 'pm1', - description: - 'Located in a mutational hot spot and/or critical and well-established functional domain (e.g., active site of an enzyme) without benign variation', - hint: 'variant in hotspot (missense)', - score: ACMGRankingScores.PM, - scoreCustom: null, - active: false - }, - pm2: { - name: 'PM2', - id: 'pm2', - description: - 'Absent from controls (or at extremely low frequency if recessive) in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium', - hint: 'rare; < 1:20.000 in ExAC', - score: ACMGRankingScores.PM, - scoreCustom: null, - active: false - }, - pm3: { - name: 'PM3', - id: 'pm3', - description: 'For recessive disorders, detected in trans with a pathogenic variant', - hint: 'AR: trans with known pathogenic', - score: ACMGRankingScores.PM, - scoreCustom: null, - active: false - }, - pm4: { - name: 'PM4', - id: 'pm4', - description: - 'Protein length changes as a result of in-frame deletions/insertions in a nonrepeat region or stop-loss variants', - hint: 'protein length change', - score: ACMGRankingScores.PM, - scoreCustom: null, - active: false - }, - pm5: { - name: 'PM5', - id: 'pm5', - description: - 'Novel missense change at an amino acid residue where a different missense change determined to be pathogenic has been seen before', - hint: 'literature: AA exchange same pos', - score: ACMGRankingScores.PM, - scoreCustom: null, - active: false - }, - pm6: { - name: 'PM6', - id: 'pm6', - description: 'Assumed de novo, but without confirmation of paternity and maternity', - hint: 'assumed de novo', - score: ACMGRankingScores.PM, - scoreCustom: null, - active: false - }, - pp1: { - name: 'PP1', - id: 'pp1', - description: - 'Cosegregation with disease in multiple affected family members in a gene definitively known to cause the disease', - hint: 'cosegregates in family', - score: ACMGRankingScores.PP, - scoreCustom: null, - active: false - }, - pp2: { - name: 'PP2', - id: 'pp2', - description: - 'Missense variant in a gene that has a low rate of benign missense variation and in which missense variants are a common mechanism of disease', - hint: 'few missense in gene', - score: ACMGRankingScores.PP, - scoreCustom: null, - active: false - }, - pp3: { - name: 'PP3', - id: 'pp3', - description: - 'Multiple lines of computational evidence support a deleterious effect on the gene or gene product (conservation, evolutionary, splicing impact, etc.)', - hint: 'predicted pathogenic >= 2', - score: ACMGRankingScores.PP, - scoreCustom: null, - active: false - }, - pp4: { - name: 'PP4', - id: 'pp4', - description: - "Patient's phenotype or family history is highly specific for a disease with a single genetic etiology", - hint: 'phenotype/pedigree match gene', - score: ACMGRankingScores.PP, - scoreCustom: null, - active: false - }, - pp5: { - name: 'PP5', - id: 'pp5', - description: - 'Reputable source recently reports variant as pathogenic, but the evidence is not available to the laboratoryto perform an independent evaluation', - hint: 'reliable source: pathogenic', - score: ACMGRankingScores.PP, - scoreCustom: null, - active: false - } - }, - benign: { - ba1: { - name: 'BA1', - id: 'ba1', - description: - 'Allele frequency is >5% in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium', - hint: 'allele frequency > 5%', - score: ACMGRankingScores.BA, - scoreCustom: null, - active: false - }, - bs1: { - name: 'BS1', - id: 'bs1', - description: 'Allele frequency is greater than expected for disorder', - hint: 'disease: allele freq. too high', - score: ACMGRankingScores.BS, - scoreCustom: null, - active: false - }, - bs2: { - name: 'BS2', - id: 'bs2', - description: - 'Observed in a healthy adult individual for a recessive (homozygous), dominant (heterozygous), or X-linked (hemizygous) disorder, with full penetrance expected at an early age', - hint: 'observed in healthy individual', - score: ACMGRankingScores.BS, - scoreCustom: null, - active: false - }, - bs3: { - name: 'BS3', - id: 'bs3', - description: - 'Well-established in vitro or in vivo functional studies show no damaging effect on protein function or splicing', - hint: 'functional studies: benign', - score: ACMGRankingScores.BS, - scoreCustom: null, - active: false - }, - bs4: { - name: 'BS4', - id: 'bs4', - description: 'Lack of segregation in affected members of a family', - hint: 'lack of segregation', - score: ACMGRankingScores.BS, - scoreCustom: null, - active: false - }, - bp1: { - name: 'BP1', - id: 'bp1', - description: - 'Missense variant in a gene for which primarily truncating variants are known to cause disease', - hint: 'missense in gene with truncating', - score: ACMGRankingScores.BP, - scoreCustom: null, - active: false - }, - bp2: { - name: 'BP2', - id: 'bp2', - description: - 'Observed in trans with a pathogenic variant for a fully penetrant dominant gene/disorder or observed in cis with a pathogenic variant in any inheritance pattern', - hint: 'other variant is causative', - score: ACMGRankingScores.BP, - scoreCustom: null, - active: false - }, - bp3: { - name: 'BP3', - id: 'bp3', - description: 'In-frame deletions/insertions in a repetitive region without a known function', - hint: 'in-frame indel in repeat', - score: ACMGRankingScores.BP, - scoreCustom: null, - active: false - }, - bp4: { - name: 'BP4', - id: 'bp4', - description: - 'Multiple lines of computational evidence suggest no impact on gene or gene product (conservation, evolutionary,splicing impact, etc.)', - hint: 'prediction: benign', - score: ACMGRankingScores.BP, - scoreCustom: null, - active: false - }, - bp5: { - name: 'BP5', - id: 'bp5', - description: 'Variant found in a case with an alternate molecular basis for disease', - hint: 'different gene in other case', - score: ACMGRankingScores.BP, - scoreCustom: null, - active: false - }, - bp6: { - name: 'BP6', - id: 'bp6', - description: - 'Reputable source recently reports variant as benign, but the evidence is not available to the laboratory to perform an independent evaluation', - hint: 'reputable source: benign', - score: ACMGRankingScores.BP, - scoreCustom: null, - active: false - }, - bp7: { - name: 'BP7', - id: 'bp7', - description: - 'A synonymous (silent) variant for which splicing prediction algorithms predict no impact to the splice consensus sequence nor the creation of a new splice site AND the nucleotide is not highly conserved', - hint: 'silent, no splicing/conservation', - score: ACMGRankingScores.BP, - scoreCustom: null, - active: false - } - } -} - -const acmgRatingComputed = ref(JSON.parse(JSON.stringify(acmgRating))) -const acmgRatingCustom = ref(JSON.parse(JSON.stringify(acmgRating))) const acmgRatingConflicting = ref(false) const acmgRatingScore = ref(0) const acmgRatingScoreComputed = ref(0) @@ -345,44 +28,32 @@ const showTooltip = ref(false) const showSwitches = ref(false) const showFailed = ref(false) -// Defining methods - const unsetAcmgRating = () => { - acmgRatingCustom.value = JSON.parse(JSON.stringify(acmgRating)) + ACMGRanking.userSelected = { ...ACMGRanking.default } } -const setAcmgRating = () => { - if (acmgRatingStore.acmgRatingComputed) { - for (const [key, value] of Object.entries(acmgRatingStore.acmgRatingComputed)) { +const setInterVarAcmgRating = () => { + if (acmgRatingStore.acmgRatingInterVar) { + for (const [key, value] of Object.entries(acmgRatingStore.acmgRatingInterVar)) { if (value === true) { - for (const [criteriaKey, criteria] of Object.entries( - acmgRatingComputed.value.pathogenic - ) as any) { - if (criteriaKey === key) { - criteria.active = true - } - } - for (const [criteriaKey, criteria] of Object.entries( - acmgRatingComputed.value.benign - ) as any) { + for (const [criteriaKey, criteria] of Object.entries(ACMGRanking.interVar) as any) { if (criteriaKey === key) { criteria.active = true } } } } - acmgRatingCustom.value = JSON.parse(JSON.stringify(acmgRatingComputed.value)) - const acmgScore = calculateAcmgScore(acmgRatingComputed.value) + + ACMGRanking.userSelected = { ...ACMGRanking.interVar } + const acmgScore = calculateAcmgScore(ACMGRanking.interVar) acmgRatingScoreComputed.value = acmgScore.acmgScore } else { - acmgRatingComputed.value = JSON.parse(JSON.stringify(acmgRating)) - acmgRatingCustom.value = JSON.parse(JSON.stringify(acmgRating)) unsetAcmgRating() } } const resetAcmgRating = () => { - acmgRatingCustom.value = JSON.parse(JSON.stringify(acmgRatingComputed.value)) + ACMGRanking.userSelected = { ...ACMGRanking.interVar } } const updateAcmgClass = (isConflicting: boolean, pathogenicScore: number, benignScore: number) => { @@ -395,14 +66,14 @@ const updateAcmgClass = (isConflicting: boolean, pathogenicScore: number, benign const calculateAcmgScore = (acmgRating: any) => { let pathogenicScore = 0 let benignScore = 0 - for (const criteria of Object.values(acmgRating.pathogenic) as any) { + for (const criteria of Object.values(acmgRating) as any) { if (criteria.active) { - pathogenicScore += criteria.scoreCustom || criteria.score.score + pathogenicScore += criteria.evidence } } - for (const criteria of Object.values(acmgRating.benign) as any) { + for (const criteria of Object.values(acmgRating) as any) { if (criteria.active) { - benignScore += criteria.scoreCustom || criteria.score.score + benignScore += criteria.evidence } } const acmgScore = pathogenicScore + benignScore @@ -414,7 +85,7 @@ const calculateAcmgScore = (acmgRating: any) => { } const calculateAcmgRating = computed(() => { - const acmgScores = calculateAcmgScore(acmgRatingCustom.value) + const acmgScores = calculateAcmgScore(ACMGRanking.userSelected) const acmgScore = acmgScores.acmgScore const pathogenicScore = acmgScores.pathogenicScore const benignScore = acmgScores.benignScore @@ -444,8 +115,6 @@ const calculateAcmgRating = computed(() => { return ScoreExplanation[computedClassAuto as 1 | 2 | 3 | 4 | 5] }) -// Defining watchers - watch( () => [props.smallVariant, acmgRatingStore.storeState], async () => { @@ -459,7 +128,7 @@ watch( onMounted(async () => { if (props.smallVariant) { await acmgRatingStore.retrieveAcmgRating(props.smallVariant) - setAcmgRating() + setInterVarAcmgRating() } }) @@ -526,19 +195,17 @@ onMounted(async () => { - Automatically selected + InterVar -
-
- {{ criteria.name }}: +{{ criteria.score.score }} +
+
+ {{ criteria.id }}: +{{ criteria.evidence }}
-
-
-
- {{ criteria.name }}: {{ criteria.score.score }} +
+ {{ criteria.id }}: {{ criteria.evidence }}
@@ -546,17 +213,15 @@ onMounted(async () => { Manually selected -
-
- {{ criteria.name }}: +{{ criteria.scoreCustom || criteria.score.score }} +
+
+ {{ criteria.id }}: +{{ criteria.evidence }}
-
-
-
- {{ criteria.name }}: {{ criteria.scoreCustom || criteria.score.score }} +
+ {{ criteria.id }}: {{ criteria.evidence }}
@@ -564,32 +229,18 @@ onMounted(async () => { Difference -
+
- {{ criteria.name }}: +{{ criteria.scoreCustom || criteria.score.score }} + {{ criteria.id }}: +{{ criteria.evidence }}
-
-
- {{ criteria.name }}: {{ criteria.scoreCustom || criteria.score.score }} -
-
-
+
Score computed: {{ acmgRatingScoreComputed }} /VS/ Custom score: {{ acmgRatingScore }}
@@ -637,14 +288,16 @@ onMounted(async () => {

Pathogenic:

-
- +
+
+ +
@@ -652,14 +305,16 @@ onMounted(async () => {

Benign:

-
- +
+
+ +
@@ -680,24 +335,18 @@ onMounted(async () => { - - -

Pathogenic:

- - - - +
- + @@ -710,68 +359,17 @@ onMounted(async () => { - - - - - - - - {{ criteria.description }} - - - - -

Benign:

- - - - - - -
- - - - -
- - - - - - - - - + > --> diff --git a/frontend/src/stores/variantAcmgRating.ts b/frontend/src/stores/variantAcmgRating.ts index a8f6c639..af624ce7 100644 --- a/frontend/src/stores/variantAcmgRating.ts +++ b/frontend/src/stores/variantAcmgRating.ts @@ -22,14 +22,14 @@ export const useVariantAcmgRatingStore = defineStore('variantAcmgRating', () => const smallVariant = ref(null) /** The small variants ACMG rating as fetched from API. */ - const acmgRatingComputed = ref(null) + const acmgRatingInterVar = ref(null) /** The small variants ACMG rating updated by user */ const acmgRatingCustom = ref(null) function clearData() { storeState.value = StoreState.Initial - acmgRatingComputed.value = null + acmgRatingInterVar.value = null smallVariant.value = null } @@ -58,7 +58,7 @@ export const useVariantAcmgRatingStore = defineStore('variantAcmgRating', () => if (!response.ok) { throw new Error('There was an error loading the ACMG data.') } - acmgRatingComputed.value = await response.json() + acmgRatingInterVar.value = await response.json() smallVariant.value = smallVar storeState.value = StoreState.Active } catch (e) { @@ -71,13 +71,13 @@ export const useVariantAcmgRatingStore = defineStore('variantAcmgRating', () => const submitAcmgRating = async (smallVar: SmallVariant, payload: Object) => { // TODO: Implement the API call to submit the ACMG rating to ClinVar smallVariant.value = smallVar - acmgRatingComputed.value = payload + acmgRatingInterVar.value = payload } return { smallVariant, storeState, - acmgRatingComputed, + acmgRatingInterVar, acmgRatingCustom, clearData, retrieveAcmgRating,