Learn R Programming

Seurat (version 2.1.0)

ProjectPCA: Project Principal Components Analysis onto full dataset

Description

Takes a pre-computed PCA (typically calculated on a subset of genes) and projects this onto the entire dataset (all genes). Note that the cell loadings remains unchanged, but now there are gene loading scores for all genes.

Usage

ProjectPCA(object, do.print = TRUE, pcs.print = 1:5, pcs.store = 30,
  genes.print = 30, replace.pc = FALSE, do.center = FALSE)

Arguments

object

Seurat object

do.print

Print top genes associated with the projected PCs

pcs.print

Number of PCs to print genes for

pcs.store

Number of PCs to store (default is 30)

genes.print

Number of genes with highest/lowest loadings to print for each PC

replace.pc

Replace the existing PCA (overwite object@dr$pca@gene.loadings), not done by default.

do.center

Center the dataset prior to projection (should be set to TRUE)

Value

Returns Seurat object with the projected PCA values in object@dr$pca@gene.loadings.full

Examples

Run this code
# NOT RUN {
pbmc_small
pbmc_small <- ProjectPCA(pbmc_small)
# Vizualize top projected genes in heatmap
PCHeatmap(pbmc_small,pc.use = 1,use.full = TRUE,do.balanced = TRUE)

# }

Run the code above in your browser using DataLab