From b27a999a5df5ba74cc6e8eb86c49fe4f975dae2a Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Tue, 6 Feb 2024 15:58:10 +0100 Subject: [PATCH] fix: color coding of gene-clinvar plots (bihealth/reev#445) --- src/components/GeneClinvarCard/ClinvarFreqPlot.vue | 7 +++++-- src/components/GeneClinvarCard/ClinvarImpact.vue | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/GeneClinvarCard/ClinvarFreqPlot.vue b/src/components/GeneClinvarCard/ClinvarFreqPlot.vue index 823b28f..c5b4e1a 100644 --- a/src/components/GeneClinvarCard/ClinvarFreqPlot.vue +++ b/src/components/GeneClinvarCard/ClinvarFreqPlot.vue @@ -63,7 +63,10 @@ const vegaData = computed(() => { }[] = [] for (const record of props.clinvarPerGene?.perFreqCounts || []) { for (let i = 0; i < record.counts.length; i++) { - if (record.counts[i] > 0) { + if ( + record.counts[i] > 0 && + record.coarseClinsig !== CoarseClinicalSignificance.COARSE_CLINICAL_SIGNIFICANCE_UNKNOWN + ) { const value = { coarseClinsig: COARSE_CLINSIG_LABELS[record.coarseClinsig], freqBucket: bucketLabels[i], @@ -127,7 +130,7 @@ const vegaEncoding = { type: 'nominal', sort: Object.values(COARSE_CLINSIG_LABELS), scale: { - domain: Object.values(COARSE_CLINSIG_LABELS), + domain: Object.values(COARSE_CLINSIG_LABELS).filter((label) => label !== 'unknown'), range: ['#5d9936', '#f5c964', '#b05454'] } } diff --git a/src/components/GeneClinvarCard/ClinvarImpact.vue b/src/components/GeneClinvarCard/ClinvarImpact.vue index 32c3fa9..8f1e20e 100644 --- a/src/components/GeneClinvarCard/ClinvarImpact.vue +++ b/src/components/GeneClinvarCard/ClinvarImpact.vue @@ -144,7 +144,7 @@ const clinsigColor = (coarseClinsigIdx: number, percent: number): string => { case 2: return `rgba(93, 153, 54, ${intensity})` case 1: - return `rgba(150, 150, 150, ${intensity})` + return `rgba(245, 201, 100, ${intensity})` case 0: return `rgba(176, 84, 84, ${intensity})` default: