colors_scExp: Adding colors to cells & features

Description Usage Arguments Value Examples

View source: R/plotting_functions.R

Description

Adding colors to cells & features

Usage

1
2
3
4
5
6
colors_scExp(
  scExp,
  annotCol = "sample_id",
  color_by = "sample_id",
  color_df = NULL
)

Arguments

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

Value

A SingleCellExperiment with additionnal "color" columns in colData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

ChromSCape documentation built on Nov. 8, 2020, 6:57 p.m.