SelectColors: Creates a list of unique color values used for plotting

Description Usage Arguments Value See Also Examples

View source: R/scAlignSeuratWrapper.R

Description

Creates a list of unique color values used for plotting

Usage

1
SelectColors(seurat.obj, gradient = FALSE, value = "celltype")

Arguments

seurat.obj

A singular preprocessed Seurat object

gradient

Setting to TRUE will use a sequence of hsv colors instead of 20 unique colors, useful for comparisons of more than 20 cell types.

value

The Seurat metadata slot to generate colors for. Defaults to "celltype".

Value

A named vector of unique hexedecimal color values, either generated from a preselected vector of 20 unique colors, or from a sequence of colors in hsv colorspace.

See Also

as.SingleCellExperimentList

ExtractGenes

DecoderVariance

MeanDecoderVariance

GetCharMetadata

Examples

1
2
3
4
5
6
DimPlot(object = seurat.obj,
        reduction = "tsne",
        cols = SelectColors(seurat.obj),
        group.by = "celltype",
        label = TRUE,
        repel = TRUE)

quon-titative-biology/scAlign documentation built on Nov. 17, 2021, 9:57 a.m.