Skip to content

Commit

Permalink
fix: present clinvar info
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Oct 16, 2023
1 parent 7f9c1e4 commit abe3e02
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions frontend/src/components/VariantDetails/ClinVar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ const props = defineProps({
})
const interpretations = [
'N/A',
'Benign',
'Likely benign',
'Uncertain signifiance',
'Likely pathogenic',
'Pathogenic'
'pathogenic', // 0
'likely pathogenic', // 1
'uncertain signifiance', // 2
'likely benign', // 3
'benign', // 4
'other'
]
</script>

Expand All @@ -20,19 +20,15 @@ const interpretations = [
NCBI ClinVar will display the most current data that may differ from our "frozen" copy.
</div>
<v-divider />
<div v-if="props.clinvar?.vcv">
<div v-if="props.clinvar?.rcv">
<div>
<strong>Interpretation: </strong>
{{
props.clinvar.summary_clinvar_pathogenicity
.map((num: any) => interpretations[num])
.join(', ')
}}
{{ interpretations[props.clinvar.clinical_significance] }}
</div>
<div>
<strong>Review Status: </strong>
<div v-for="i of [1, 2, 3, 4, 5]" :key="i" style="display: inline">
<div v-if="i <= props.clinvar.summary_clinvar_gold_stars" style="display: inline">
<div v-if="i <= props.clinvar.review_status" style="display: inline">
<v-icon>mdi-star</v-icon>
</div>
<div v-else style="display: inline">
Expand All @@ -42,12 +38,9 @@ const interpretations = [
</div>
<div>
<strong>Accession: </strong>
<a
:href="`https://www.ncbi.nlm.nih.gov/props.clinvar/?term=${props.clinvar.vcv}`"
target="_blank"
>
<a :href="`https://www.ncbi.nlm.nih.gov/clinvar/${props.clinvar.rcv}/`" target="_blank">
<v-icon>mdi-launch</v-icon>
{{ props.clinvar.vcv }}
{{ props.clinvar.rcv }}
</a>
</div>
</div>
Expand Down

0 comments on commit abe3e02

Please sign in to comment.