Defines the number of principal components (PCs) to retain based on the elbow plot criteria. The function uses two criteria:

  1. The point where the principal components only contribute 5% of the standard deviation and the principal components cumulatively contribute 90% of the standard deviation.

  2. The point where the percent change in variation between consecutive PCs is less than 0.1%.

FindPC(srat, reduction = "pca")

Arguments

srat

A Seurat object containing the PCA reduction.

reduction

Character; the name of the reduction technique to use. Default is "pca".

Value

Integer; the number of principal components to retain.

References

For more details on the elbow plot method, refer to the Harvard Chan Bioinformatics Core scRNA-seq training.