Skip to content

Commit

Permalink
feat: integrate new gnomAD v4 data (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Jan 9, 2024
1 parent c7c7ea8 commit fdaa808
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/GeneDetails/PathogenicityCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const props = withDefaults(defineProps<Props>(), {
<template v-if="geneInfo?.gnomadConstraints">
<div class="text-subtitle-1">
gnomAD
<small> v2.1.1 </small>
<small> v4.0 </small>
<small v-if="geneInfo?.hgnc?.ensemblGeneId?.length">
<a
:href="`https://gnomad.broadinstitute.org/gene/${geneInfo?.hgnc.ensemblGeneId}?dataset=gnomad_r4`"
Expand Down
20 changes: 10 additions & 10 deletions frontend/src/components/SeqvarDetails/FreqsCard/AutosomalFreqs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const noCohort = computed(() => {
const byPop = computed(() => {
const res: any = {}
for (const record of noCohort.value?.byPopulation ?? []) {
res[record.population] = record
for (const record of noCohort.value?.byPopulation ?? noCohort.value?.byAncestryGroup ?? []) {
res[record.population ?? record.ancestryGroup] = record
}
return res
})
Expand All @@ -47,7 +47,8 @@ const allPopLabels = {
nfe: 'European (North-Western)',
amr: 'Latino/Admixed American',
sas: 'South Asian',
oth: 'Other'
oth: 'Other',
remaining: 'Remaining'
}
const idKey = (token: string): string => {
Expand Down Expand Up @@ -81,7 +82,7 @@ const sexExpanded: any = ref({})
v-if="seqvar.genomeBuild == 'grch38'"
:href="`https://gnomad.broadinstitute.org/variant/${seqvar.chrom.replace(/^chr/, '')}-${
seqvar.pos
}-${seqvar.del}-${seqvar.ins}?dataset=gnomad_r3`"
}-${seqvar.del}-${seqvar.ins}?dataset=gnomad_r4`"
target="_blank"
>
<v-icon>mdi-launch</v-icon>
Expand Down Expand Up @@ -146,13 +147,12 @@ const sexExpanded: any = ref({})
{{ sep(byPop[key]?.counts?.xx?.an ?? 0) }}
</td>
<td class="text-right text-no-wrap">
{{ sep(byPop[key]?.counts?.xx?.nhomal ?? 0) }}
{{ sep(byPop[key]?.counts?.xx?.ac ?? 0) }}
</td>
<td class="text-right text-no-wrap">
{{ sep(byPop[key]?.counts?.xx?.nhomhalt ?? 0) }}
</td>
<!-- eslint-disable vue/no-v-html -->
<td
class="text-right text-no-wrap"
v-html="roundIt(byPop[key]?.counts?.xx?.af ?? 0.0, FREQ_DIGITS)"
/>
<td
class="text-right text-no-wrap"
v-html="roundIt(byPop[key]?.counts?.xx?.af, FREQ_DIGITS)"
Expand Down Expand Up @@ -259,7 +259,7 @@ const sexExpanded: any = ref({})
v-if="seqvar.genomeBuild == 'grch38'"
:href="`https://gnomad.broadinstitute.org/variant/${seqvar.chrom.replace(/^chr/, '')}-${
seqvar.pos
}-${seqvar.del}-${seqvar.ins}?dataset=gnomad_r3`"
}-${seqvar.del}-${seqvar.ins}?dataset=gnomad_r4`"
>
<v-icon>mdi-launch</v-icon>
gnomAD
Expand Down

0 comments on commit fdaa808

Please sign in to comment.