HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
66 stars 31 forks source link

How to increase the default colour scheme of CATALYST? #371

Closed zoqaiyum closed 1 year ago

zoqaiyum commented 1 year ago

Hello,

I ran an Rphenograph analysis on a subset of single cells (from a mass cytometry experiment) and obtained 33 clusters. I wanted to use the default colour scheme from CATALYST to annotate the different colours in a code like this:

catalystcols <- CATALYST:::.cluster_cols

However, this gives me a character (catalystcols) containing only 30 different colour values. Is there any way to expand the default colour palette of CATALYST so that 3 more colours could be added?

Many thanks.

SamGG commented 1 year ago

Hi, I think that Helena and Mark chose these colors carefully in order to achieve the best possible distinction to the eye. Finding distinct colors is not an easy task. When I need an alternative to this selection or more colors, I use I want hue. HTH

HelenaLC commented 1 year ago

Independent of the choice of colors; CATALYST's plotting functions will always ramp colors if need be. E.g., if there are n entities (e.g., clusters), grDevices::colorRampPalette(<palette>)(n) will be called - so I'm not sure how the question came up - is this failing somewhere for 33 clusters? or are you trying to produce custom plots using the the same colors (then the above should help)?