From b1b246f988f11676c6f35b7ea880fd685101f1aa Mon Sep 17 00:00:00 2001 From: Ben Capodanno Date: Thu, 21 Nov 2024 16:41:03 -0800 Subject: [PATCH] Fixed: Nucleotide heatmap was not displayed for regulatory targets. This change allows a nucleotide heatmap to be displayed for non-coding and regulatory targets. We will prefer the protein heatmap, displaying it if all protein variants are defined. If not, we fall back to the nucleotide heatmap for non-coding and regulatory target categories. --- src/components/ScoreSetHeatmap.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ScoreSetHeatmap.vue b/src/components/ScoreSetHeatmap.vue index 7b15195..be9b2f8 100644 --- a/src/components/ScoreSetHeatmap.vue +++ b/src/components/ScoreSetHeatmap.vue @@ -91,7 +91,9 @@ export default { return [...this.simpleVariants || [], ...this.wtVariants || []] }, isNucleotideHeatmap: function() { - return _.get(this.scoreSet, 'targetGenes[0].category') === 'other_noncoding' + const targetCategory = _.get(this.scoreSet, 'targetGenes[0].category') + const proteinVariantsAreDefined = this.scores.every((elem) => elem.hgvs_pro !== null) + return !proteinVariantsAreDefined && (targetCategory === 'other_noncoding' || targetCategory == "regulatory") }, heatmapRows: function() { return this.isNucleotideHeatmap ? HEATMAP_NUCLEOTIDE_ROWS : HEATMAP_AMINO_ACID_ROWS