From 71e80fa3bf87ec9305213e8e40ed500d013fd727 Mon Sep 17 00:00:00 2001 From: timparsons Date: Thu, 9 Mar 2023 22:44:03 -0500 Subject: [PATCH] [BI-1741] Fixing display of genotype data due to Gigwa changes --- .../germplasm/GermplasmGenotypeView.vue | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/components/germplasm/GermplasmGenotypeView.vue b/src/components/germplasm/GermplasmGenotypeView.vue index 8a55e7d39..12d67a736 100644 --- a/src/components/germplasm/GermplasmGenotypeView.vue +++ b/src/components/germplasm/GermplasmGenotypeView.vue @@ -53,7 +53,7 @@ v-bind:details="true" v-if="!loading && callsetOptions.length > 0" > - + @@ -94,7 +94,7 @@ - + {{ genotypeVal(allele, props.row.data.variantDbId) }} @@ -280,9 +280,9 @@ export default class GermplasmGenotypeView extends GermplasmBase { } } - alleleType(genotypeStr: string) { - const genotype: number = parseInt(genotypeStr); - if(genotype === 0) { + alleleType(genotypeStr: string, variantId: string) { + const variant = this.genotypeData!.variants[variantId]; + if(genotypeStr === variant.referenceBases) { return 'is-success'; } else { return 'is-warning'; @@ -290,17 +290,7 @@ export default class GermplasmGenotypeView extends GermplasmBase { } genotypeVal(genotypeStr: string, variantId: string) { - const genotype: number = parseInt(genotypeStr); - const variant = this.genotypeData!.variants[variantId]; - - const ref: string = variant.referenceBases; - const alts: Array = variant.alternate_bases; - - if(genotype === 0) { - return ref; - } else if(genotype > 0) { - return alts[genotype-1]; - } + return genotypeStr; } getGenotypes(call: Call) {