plotSeuratElbow: plotSeuratElbow Computes the plot object for elbow plot from...

View source: R/seuratFunctions.R

plotSeuratElbowR Documentation

plotSeuratElbow Computes the plot object for elbow plot from the pca slot in the input sce object

Description

plotSeuratElbow Computes the plot object for elbow plot from the pca slot in the input sce object

Usage

plotSeuratElbow(
  inSCE,
  significantPC = NULL,
  reduction = "pca",
  ndims = 20,
  externalReduction = NULL,
  interactive = TRUE
)

Arguments

inSCE

(sce) object from which to compute the elbow plot (pca should be computed)

significantPC

Number of significant principal components to plot. This is used to alter the color of the points for the corresponding PCs. If NULL, all points will be the same color. Default NULL.

reduction

Reduction to use for elbow plot generation. Either "pca" or "ica". Default "pca".

ndims

Number of components to use. Default 20.

externalReduction

Pass DimReduc object if PCA/ICA computed through other libraries. Default NULL.

interactive

Logical value indicating if the returned object should be an interactive plotly object if TRUE or a ggplot object if set to FALSE. Default is TRUE.

Value

plot object

Examples

data(scExample, package = "singleCellTK")
## Not run: 
sce <- runSeuratNormalizeData(sce, useAssay = "counts")
sce <- runSeuratFindHVG(sce, useAssay = "counts")
sce <- runSeuratScaleData(sce, useAssay = "counts")
sce <- runSeuratPCA(sce, useAssay = "counts")
plotSeuratElbow(sce)

## End(Not run)

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.