I'm trying to change annotation color, but after trying multiple parameters I still couldn't figure out how it passes the values of color in that function.
library(scRNAseq)
library(scater)
sceM <- MuraroPancreasData()
b<-c("CAMK2N1__chr1" , "GNAS__chr20" , "MAP1B__chr5" , "IDS__chrX" , "CPE__chr4" , "HADH__chr4" )
default color is like this, which works well.
plotHeatmap(sceM, order_columns_by="label", features=b)
assign annotation manually, but still gives me default colors.
newCols <- colorRampPalette(grDevices::rainbow(length(unique(sceM$label))))
mycolors <- newCols(length(unique(sceM$label)))
names(mycolors) <- unique(sceM$label)
mycolors <- list(mycolors = mycolors)
plotHeatmap(sceM, order_columns_by="label", features=b,column_annotation_colours = mycolors)
parameters I tried includes column_annotation_colours
, colour_columns_by
. I also try to dig up the raw codes from scater package plotHeatmap
function , but not really understand where went wrong.
Thank you in advance for any comments/suggestions.