Calculate the principal component (PC) cutoff using a heuristic approach.

plotPCElbow(object, ...)

# S4 method for Seurat
plotPCElbow(object, reducedDim = "pca", minSD = 1L,
  minPct = 0.01, maxCumPct = 0.9, trans = c("identity", "sqrt"))

Arguments

object

Object.

reducedDim

character(1). Name of reduced dimension matrix slotted in reducedDims(). Includes TNSE, UMAP, PCA, for example.

minSD

numeric(1). Minimum standard deviation.

minPct

numeric(1) (0-1). Minimum percent standard deviation.

maxCumPct

numeric(1) (0-1). Maximum cumulative percen standard deviation.

trans

character(1). Name of the axis scale transformation to apply.

For more information:

help(topic = "scale_x_continuous", package = "ggplot2")
...

Additional arguments.

Value

  • Show graphical output of elbow plots.

  • Invisibly return numeric sequence vector of PCs to include for dimensionality reduction analysis.

Details

Automatically return the smallest number of PCs that match the minSD, minPct, and maxCumPct cutoffs.

See also

Seurat::PCElbowPlot().

Examples

data(pbmc_small, package = "Seurat") plotPCElbow(pbmc_small)