ChoosePCs: Automatically choose the number of principal components.

View source: R/ChoosePCs.R

ChoosePCsR Documentation

Automatically choose the number of principal components.

Description

This function uses the eigenvalues of the principal component matrix to determine the best number of PCs. The default can be chosen automatically, or given by the user. It is intended to be run after RunPCA.

Usage

ChoosePCs(seurat.obj = NULL, cutoff = 0.15)

Arguments

seurat.obj

The object containing our single cell counts and principal component matrix. Defaults to NULL.

cutoff

The cutoff value for cumulative proportion of variance explained. Can be set by the user, or can be determine automatically. Defaults to 15%.

Value

An integer specifying the number of PCs to use.

Author(s)

Jack Leary

Examples

## Not run: 
ChoosePCs(seurat.obj = pbmc, cutoff = .3)

## End(Not run)

jr-leary7/SCISSORS documentation built on April 20, 2023, 8:21 p.m.