ExprColors: Generate colors for multi-color marker expression labeling in...

View source: R/utils.R

ExprColorsR Documentation

Generate colors for multi-color marker expression labeling in a single plot

Description

Generate colors for multi-color marker expression labeling in a single plot

Usage

ExprColors(
  exprs,
  base = exp(1),
  scale = 1,
  cutoff = 0,
  pow = NULL,
  col = ClusterPalette(dim(exprs)[2], alpha = alpha),
  nocolor = grDevices::rgb(0.75, 0.75, 0.75, alpha/2),
  alpha = 0.5
)

Arguments

exprs

Matrix-like object with marker expressions (extract it manually from your data)

base, scale

Base(s) and scale(s) for softmax (convertible to numeric vectors of size 1+ncol(exprs))

cutoff

Gray level (expressed in sigmas of the sample distribution)

pow

Obsolete, now renamed to scale.

col

Colors to use, defaults to colors taken from 'ClusterPalette'

nocolor

The color to use for sub-gray-level expression, default gray.

alpha

Default alpha value.

Examples

d <- cbind(rnorm(1e5), rexp(1e5))
EmbedSOM::PlotEmbed(d, col=EmbedSOM::ExprColors(d, pow=2))

EmbedSOM documentation built on July 5, 2022, 5:14 p.m.