Skip to content

Commit

Permalink
fix: color coding of gene-clinvar plots (bihealth/reev#445) (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Feb 6, 2024
1 parent fcf376e commit 79658a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/GeneClinvarCard/ClinvarFreqPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ const vegaData = computed<any>(() => {
}[] = []
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],
Expand Down Expand Up @@ -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']
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/GeneClinvarCard/ClinvarImpact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 79658a3

Please sign in to comment.