JackStraw: Determine statistical significance of PCA scores.

View source: R/dimensional_reduction.R

JackStrawR Documentation

Determine statistical significance of PCA scores.

Description

Randomly permutes a subset of data, and calculates projected PCA scores for these 'random' genes. Then compares the PCA scores for the 'random' genes with the observed PCA scores to determine statistical signifance. End result is a p-value for each gene's association with each principal component.

Usage

JackStraw(
  object,
  reduction = "pca",
  assay = NULL,
  dims = 20,
  num.replicate = 100,
  prop.freq = 0.01,
  verbose = TRUE,
  maxit = 1000
)

Arguments

object

Seurat object

reduction

DimReduc to use. ONLY PCA CURRENTLY SUPPORTED.

assay

Assay used to calculate reduction.

dims

Number of PCs to compute significance for

num.replicate

Number of replicate samplings to perform

prop.freq

Proportion of the data to randomly permute for each replicate

verbose

Print progress bar showing the number of replicates that have been processed.

maxit

maximum number of iterations to be performed by the irlba function of RunPCA

Value

Returns a Seurat object where JS(object = object[['pca']], slot = 'empirical') represents p-values for each gene in the PCA analysis. If ProjectPCA is subsequently run, JS(object = object[['pca']], slot = 'full') then represents p-values for all genes.

References

Inspired by Chung et al, Bioinformatics (2014)

Examples

## Not run: 
data("pbmc_small")
pbmc_small = suppressWarnings(JackStraw(pbmc_small))
head(JS(object = pbmc_small[['pca']], slot = 'empirical'))

## End(Not run)


satijalab/seurat documentation built on March 20, 2024, 8:41 p.m.