From 557598beacdf4169a7405df3d3eb729d73b1b315 Mon Sep 17 00:00:00 2001 From: Dennis Hendriksen Date: Mon, 18 Jan 2021 10:39:40 +0100 Subject: [PATCH] Fix #106 Show warning in case of low read depth --- src/components/Genotype.vue | 15 +++++++++++++-- src/components/RecordTable.vue | 3 +++ src/locales/en.json | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/Genotype.vue b/src/components/Genotype.vue index a2d679c9..83114bed 100644 --- a/src/components/Genotype.vue +++ b/src/components/Genotype.vue @@ -7,12 +7,15 @@ @@ -28,9 +31,17 @@ export default Vue.extend({ components: { Allele }, props: { genotype: Object as PropType, + readDepth: { type: Number as PropType, required: false }, allelicDepth: { type: Array as PropType, 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') { diff --git a/src/components/RecordTable.vue b/src/components/RecordTable.vue index df89d110..45957232 100644 --- a/src/components/RecordTable.vue +++ b/src/components/RecordTable.vue @@ -56,18 +56,21 @@ diff --git a/src/locales/en.json b/src/locales/en.json index a92a8626..a0a21adc 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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" } \ No newline at end of file