PoisonAlien / maftools

Summarize, Analyze and Visualize MAF files from TCGA or in-house studies.
http://bioconductor.org/packages/release/bioc/html/maftools.html
MIT License
450 stars 222 forks source link

How to define colors for clinical features that use continuous values #1053

Open PoisonAlien opened 1 month ago

PoisonAlien commented 1 month ago

Discussed in https://github.com/PoisonAlien/maftools/discussions/1051

Originally posted by **juferban** September 21, 2024 Hi, I tried to add clinicalFeatures to my oncoplot that are continuous variables. While I manage to do it, I cannot figure out how to change the color scheme. I tried using the numericAnnoCol and assign a different scheme name but none of the approaches I tried seem to affect the color shceme used I tried using a list that has a key = value pair where the key is the name of the clinicalFeature and the value is the name of the color scheme to use. I tried different ways to add the color scheme name, like using the name it self or returning the rColorBrewer scheme object. The only way I managed to use the colors I want was by precomputing the colors and adding my precomputed clinicalFeature_color column as my clinical Feature. This approach work fine with the exception that the legend now interpret the data as discrete. Any suggestion on how to apply my desired color scheme to the clinicalFeature when they values are numeric? The annotationColor variable works fine for the discrete variables. Thanks
PoisonAlien commented 1 month ago

Hi,

Thanks for the issue. I am looking into it and I will update it soon.