Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default colour scheme #152

Open
dan-knight opened this issue Sep 12, 2023 · 3 comments
Open

Default colour scheme #152

dan-knight opened this issue Sep 12, 2023 · 3 comments
Labels
question Further information is requested

Comments

@dan-knight
Copy link
Contributor

From discussion with @WuSelina:

@pboutros wants me to add a default color palette to BPG and I would like to ask you what is recommended for this. I have these colors which correspond to the following labels:

baseChange.colors <- c(
   'darksalmon',
   'lightskyblue2',
   'darkseagreen2',
   'thistle2',
   'burlywood1',
   'lemonchiffon1'
   );

legend.baseChange.labels <- c(
   'A>C/T>G',
   'A>G/T>C',
   'A>T/T>A',
   'C>T/G>A',
   'C>G/G>C',
   'C>A/G>T'
   );
@dan-knight dan-knight added the question Further information is requested label Sep 12, 2023
@dan-knight
Copy link
Contributor Author

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).

@WuSelina
Copy link

@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.

@dan-knight
Copy link
Contributor Author

Ah, I see. So default palettes for specific use cases. Are these other ones (chromosomes, gleason, etc.) already in the package somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants