Learn R Programming

Seurat (version 2.3.4)

SetDimReduction: Dimensional Reduction Mutator Function

Description

Set information for specified stored dimensional reduction analysis

Usage

SetDimReduction(object, reduction.type, slot, new.data)

Arguments

object

Seurat object

reduction.type

Type of dimensional reduction to set

slot

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

new.data

New data to set

Value

Seurat object with updated slot

Examples

Run this code
# NOT RUN {
pbmc_small
# Simulate adding a new dimensional reduction
new.cell.embeddings <- GetCellEmbeddings(object = pbmc_small, reduction.type = "pca")
new.gene.loadings <- GetGeneLoadings(object = pbmc_small, reduction.type = "pca")
SetDimReduction(
  object = pbmc_small,
  reduction.type = "new.pca",
  slot = "cell.embeddings",
  new.data = new.cell.embeddings
)
SetDimReduction(
  object = pbmc_small,
  reduction.type = "new.pca",
  slot = "gene.loadings",
  new.data = new.gene.loadings
)

# }

Run the code above in your browser using DataLab