Open dan-knight opened 1 year ago
There's already a default.colours()
function, which returns a list of colours. This is nicely generalizable, as it can return an arbitrary number of colours depending on each use-case. For example, you would use
baseChange.colours <- default.colours(number.of.colours = 6);
Is this essentially what you were imagining? It's possible that the colour scheme itself could be improved, especially as more colours are requested. For example, there's some code in CAP which does something similar, but can theoretically handle infinite colours by generating each new colour programmatically (all while ensuring proper contrast).
@dan-knight There will be six colors for this color palette. I was hoping to create a default palette for base changes included in BPG, like how we have them for chromosomes, gleason.score, tissue, etc.
The colors I have used in the example are matched to the base change colors used in this paper: Figure 2: Coding somatic SNVs are rare in non-indolent, localized tumours.
Ah, I see. So default palettes for specific use cases. Are these other ones (chromosomes, gleason, etc.) already in the package somewhere?
From discussion with @WuSelina: