Seurat (version 2.3.4)

SetAssayData: Assay Data Mutator Function

Description

Store information for specified assay, for multimodal analysis. new.data needs to have cells as the columns and measurement features (e.g. genes, proteins, etc ...) as rows. Additionally, all the cell names in the new.data must match the cell names in the object (object@cell.names).

Usage

SetAssayData(object, assay.type, slot, new.data)

Arguments

object

Seurat object

assay.type

Type of assay to fetch data for (default is RNA)

slot

Specific information to pull (i.e. raw.data, data, scale.data,...). Default is data

new.data

New data to insert

Value

Seurat object with updated slot

Examples

Run this code
# NOT RUN {
# Simulate CITE-Seq results
df <- t(x = data.frame(
  x = round(x = rnorm(n = 80, mean = 20, sd = 2)),
  y = round(x = rbinom(n = 80, size = 100, prob = 0.2)),
  row.names = pbmc_small@cell.names
))
pbmc_small <- SetAssayData(
  object = pbmc_small,
  assay.type = 'CITE',
  new.data = df,
  slot = 'data'
)
pbmc_small@assay

# }

Run the code above in your browser using DataCamp Workspace