Learn R Programming

Seurat (version 2.1.0)

GetDimReduction: Dimensional Reduction Accessor Function

Description

General accessor function for dimensional reduction objects. Pulls slot contents for specified stored dimensional reduction analysis.

Usage

GetDimReduction(object, reduction.type = "pca", slot = "gene.loadings")

Arguments

object

Seurat object

reduction.type

Type of dimensional reduction to fetch (default is PCA)

slot

Specific information to pull (must be one of the following: "cell.embeddings", "gene.loadings", "gene.loadings.full", "sdev", "key", "misc")

Value

Returns specified slot results from given reduction technique

Examples

Run this code
# NOT RUN {
pbmc_small
# Get the PCA cell embeddings and print the top left corner
GetDimReduction(object = pbmc_small, reduction.type = "pca",
                slot = "cell.embeddings")[1:5, 1:5]
# Get the standard deviation of each PC
GetDimReduction(object = pbmc_small, reduction.type = "pca", slot = "sdev")

# }

Run the code above in your browser using DataLab