Learn R Programming

Seurat (version 2.0.0)

RunPCA: Run Principal Component Analysis on gene expression using IRLBA

Description

Run a PCA dimensionality reduction. For details about stored PCA calculation parameters, see PrintPCAParams.

Usage

RunPCA(object, pc.genes = NULL, pcs.compute = 20, use.imputed = FALSE,
  rev.pca = FALSE, weight.by.var = TRUE, do.print = TRUE,
  pcs.print = 1:5, genes.print = 30, ...)

Arguments

object

Seurat object

pc.genes

Genes to use as input for PCA. Default is object@var.genes

pcs.compute

Total Number of PCs to compute and store

use.imputed

Run PCA on imputed values (FALSE by default)

rev.pca

By default computes the PCA on the cell x gene matrix. Setting to true will compute it on gene x cell matrix.

weight.by.var

Weight the cell embeddings by the variance of each PC (weights the gene loadings if rev.pca is TRUE)

do.print

Print the top genes associated with high/low loadings for the PCs

pcs.print

PCs to print genes for

genes.print

Number of genes to print for each PC

Additional arguments to be passed to IRLBA

Value

Returns Seurat object with the PCA calculation stored in object@dr$pca.