Skip to content

Commit

Permalink
Merge branch 'master' of github.com:molgenis/vip-report-template into…
Browse files Browse the repository at this point in the history
… fix/103-abbrHgvs
  • Loading branch information
marikaris committed Jan 18, 2021
2 parents 448cb86 + c332bce commit 95968d9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/components/Genotype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
</span>
</span>
<b-button
v-if="allelicImbalance"
v-if="allelicImbalance || lowReadDepth"
size="sm"
variant="link"
class="ml-2 p-0"
v-b-tooltip.click
:title="$t('allelicImbalance')"
:title="
(lowReadDepth ? $t('lowReadDepth') : '') +
(allelicImbalance ? (lowReadDepth ? ' & ' : '') + $t('allelicImbalance') : '')
"
>
<b-icon-exclamation-circle variant="danger" />
</b-button>
Expand All @@ -28,9 +31,17 @@ export default Vue.extend({
components: { Allele },
props: {
genotype: Object as PropType<Genotype>,
readDepth: { type: Number as PropType<number>, required: false },
allelicDepth: { type: Array as PropType<number[]>, required: false }
},
computed: {
lowReadDepth(): boolean {
let lowReadDepth = false;
if (this.readDepth && this.readDepth < 20) {
lowReadDepth = true;
}
return lowReadDepth;
},
allelicImbalance(): boolean {
let allelicImbalance = false;
if (this.allelicDepth && this.genotype.t === 'het') {
Expand Down
3 changes: 3 additions & 0 deletions src/components/RecordTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,21 @@
<template v-slot:cell(s)="data">
<Genotype
:genotype="data.item.s[sample.index].gt"
:readDepth="data.item.s[sample.index].f ? data.item.s[sample.index].f.DP : undefined"
:allelicDepth="data.item.s[sample.index].f ? data.item.s[sample.index].f.AD : undefined"
/>
</template>
<template v-slot:cell(father)="data">
<Genotype
:genotype="data.item.s[samplePaternal.index].gt"
:readDepth="data.item.s[samplePaternal.index].f ? data.item.s[samplePaternal.index].f.DP : undefined"
:allelicDepth="data.item.s[samplePaternal.index].f ? data.item.s[samplePaternal.index].f.AD : undefined"
/>
</template>
<template v-slot:cell(mother)="data">
<Genotype
:genotype="data.item.s[sampleMaternal.index].gt"
:readDepth="data.item.s[sampleMaternal.index].f ? data.item.s[sampleMaternal.index].f.DP : undefined"
:allelicDepth="data.item.s[sampleMaternal.index].f ? data.item.s[sampleMaternal.index].f.AD : undefined"
/>
</template>
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@
"femaleAffected": "Female, Affected.",
"femaleUnaffected": "Female, Unaffected.",
"femaleUnknown": "Female, Unknown affected status.",
"allelicImbalance": "Allelic imbalance"
"allelicImbalance": "Allelic imbalance",
"lowReadDepth": "Read depth < 20"
}

0 comments on commit 95968d9

Please sign in to comment.