plotFeatureSingle: plotFeatureSingle Allow the object can be a matrix of...

View source: R/figure.R

plotFeatureSingleR Documentation

plotFeatureSingle Allow the object can be a matrix of umap/tsne or a snap

Description

plotFeatureSingle Allow the object can be a matrix of umap/tsne or a snap

Usage

plotFeatureSingle(
  snap = NULL,
  featureValue,
  embedmat = NULL,
  method = c("tsne", "umap"),
  downSample = 10000,
  pdfile = NULL,
  pdfWidth = 7,
  pdfHeight = 7,
  quantiles = c(0.01, 0.99),
  pal = viridis::viridis(n = 256),
  colorTitle = "gene score",
  pointSize = 0.1,
  labelSize = 5,
  baseSize = 12,
  legendSize = 8,
  discrete = FALSE,
  labelMeans = FALSE,
  quantile.na.rm = TRUE,
  showLegend = FALSE,
  ...
)

Arguments

snap

A snap object, default is NULL

featureValue

Feature enrichment value for each cell. Value will be normalized betweeen 0 and 1.

embedmat

a matrix of umap or tsne, default is NULL

method

Visulization method c("tsne", "umap").

downSample

Downsample the original cells to down.sample cells to ovoid large dataset 10,000.

pdfile

pdf file name to save the plot NULL.

pdfWidth

Width of the graphics region in inches 7.

pdfHeight

Height of the graphics region in inches 7.

quantiles

Feature value outside this range will be removed c(0.01, 0.99)

pal

colors for ploting continuous numbers, default viridis::viridis(n=256)

colorTitle

legend title, default is "gene score"

pointSize

numeric, default is 0.1

labelSize

integer default is 5

baseSize

integer default is 12

legendSize

integer default is 8

discrete

bool is featureValue discrete, default is FALSE

labelMeans

bool if label the position of means, default is FALSE This is usually needed when discrete is TRUE

quantile.na.rm

bool if remove NA values when using quantile function default is TRUE, this is usually used for continuous feature values.

showLegend

bool default is FALSE

...

Arguments passed to ggPoint method

Value

ggplot object


beyondpie/pureRUtils documentation built on Jan. 10, 2023, 3:22 a.m.