findPCs | R Documentation |
Using a seurat object with PCA dimensional reduction run on it, determine the highest PC that still provides information about variance between cells. Adapted from: https://hbctraining.github.io/scRNA-seq/lessons/elbow_plot_metric.html
findPCs(seurat_obj, drName_v = "pca", min_v = T, elbow_v = T, ndims_v = 30)
seurat_obj |
A standard seurat object that has a "pca" dimensional reduction |
drName_v |
Name of pca dimensional reduction. Default is 'pca', which is Seurat default. If you create a PCA on specific genes and label it something else, provide that label name here (e.g. ccs_pca) for a PCA on cell cycle genes. |
min_v |
logical indicating to take the minimum cut-off of the two |
elbow_v |
logical indicating to make elbow plot |
ndims_v |
number of PCs to print in elbow plot |
Two cut-offs are calculated 1. The point where an individual PC contributes less than 5 and the cumulative PCs contribute at least 90 1. The point where the percent change in variation between the consecutive PCs is less than 0.1
A single numeric value with the recommended PC cut-off
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.