Skip to content

Commit

Permalink
feat: integrate AlphaMissense display in scores (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Jan 9, 2024
1 parent fdaa808 commit 385b584
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion frontend/src/components/SeqvarDetails/VariantScoresCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ export interface Props {
const props = defineProps<Props>()
const alphaMissenseScoreList = computed<number[]>(() => {
if (!props.varAnnos?.dbnsfp?.AlphaMissense_score) {
return []
} else {
return props.varAnnos.dbnsfp.AlphaMissense_score.split(';').map(parseFloat)
}
})
const alphaMissenseScore = computed<number | null>(() => {
const scores = alphaMissenseScoreList.value
if (!scores.length) {
return null
} else {
const maxScore = Math.max(...scores)
if (maxScore > 0.5) {
return maxScore
} else {
return Math.min(...scores)
}
}
})
const bestOf = (obj: any, keys: string[]) => {
if (!obj) {
return { score: null, key: null }
Expand Down Expand Up @@ -155,6 +177,23 @@ const polyphenScore = computed((): number | null =>
</tr>
</thead>
<tbody>
<tr>
<th class="align-middle">AlphaMissense</th>
<template v-if="alphaMissenseScore">
<!-- eslint-disable vue/no-v-html -->
<td class="text-center align-middle" v-html="roundIt(alphaMissenseScore, 4)" />
<!-- eslint-enable -->
<td class="text-center align-middle">
<span class="not-predictive"> &mdash; </span>
</td>
<td class="text-center align-middle">
<span class="not-predictive"> (no Pejaver computation yet) </span>
</td>
</template>
<td v-else colspan="4" class="text-muted text-center font-italic">
AlphaMissense prediction not available.
</td>
</tr>
<tr>
<th class="align-middle">BayesDel</th>
<template
Expand Down Expand Up @@ -213,7 +252,7 @@ const polyphenScore = computed((): number | null =>
props.varAnnos?.dbnsfp?.BayesDel_addAF_score >= 0.27 &&
props.varAnnos?.dbnsfp?.BayesDel_addAF_score < 0.5
"
class="pathogenic-moderat"
class="pathogenic-moderate"
>
pathogenic moderate
</span>
Expand Down

0 comments on commit 385b584

Please sign in to comment.