findPCs: Determine the number of PCs to use for downstream analysis

View source: R/findPCs.R

findPCsR Documentation

Determine the number of PCs to use for downstream analysis

Description

This function was adapted from https://hbctraining.github.io/scRNA-seq/lessons/elbow_plot_metric.html

Usage

findPCs(
  seurat_object,
  threshold_pct = 5,
  threshold_cum_pct = 90,
  threshold_diff_pct = 0.1,
  elbow_plot = FALSE
)

Arguments

seurat_object

Seurat object

threshold_pct

Threshold for percent of variation associated with each PC

threshold_cum_pct

Threshold for cumulative percent of variation associated with each PC

threshold_diff_pct

Threshold for difference between variation of PC and subsequent PC

elbow_plot

Logical value to determine if an elbow plot should be generated

Value

Number of PCs to use for downstream analysis

Examples

## Not run: 
findPCs(seurat_object,
        threshold_pct = 5,
        threshold_cum_pct = 90,
        threshold_diff_pct = 0.1,
        elbow_plot=TRUE)

## End(Not run)


odavalos/scGrabBag documentation built on Jan. 15, 2025, 11:45 p.m.