Skip to contents

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

Usage

plotPcElbow(object, ...)

# S4 method for Seurat
plotPcElbow(object, minPct = 0.01, maxCumPct = 0.9)

Arguments

object

Object.

minPct

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

maxCumPct

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

...

Additional arguments.

Value

ggplot. Elbow point is saved in attr(object, "elbow").

Details

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

Note

Updated 2023-08-16.

See also

  • Seurat::PCElbowPlot().

  • monocle3::plot_pc_variance_explained().

Examples

data(Seurat, package = "AcidTest")

## Seurat ====
object <- Seurat
plotPcElbow(object)