View source: R/plotting_functions.R
colors_scExp | R Documentation |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.