Adding colors to cells & features
colors_scExp( scExp, annotCol = "sample_id", color_by = "sample_id", color_df = NULL )
scExp | A SingleCellExperiment Object |
---|---|
annotCol | Column names to color |
color_by | If specifying color_df, column names to color |
color_df | Color data.frame to specify which color for which condition |
A SingleCellExperiment with additionnal "color" columns in colData
data("scExp") scExp = colors_scExp(scExp,annotCol = c("sample_id", "total_counts"), color_by = c("sample_id","total_counts")) #Specific colors using a manually created data.frame : color_df = data.frame(sample_id=unique(scExp$sample_id), sample_id_color=c("red","blue","green","yellow")) scExp = colors_scExp(scExp,annotCol="sample_id", color_by="sample_id",color_df=color_df)