
Last chance! 50% off unlimited learning
Sale ends in
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).
SetAssayData(object, assay.type, slot, new.data)
Seurat object
Type of assay to fetch data for (default is RNA)
Specific information to pull (i.e. raw.data, data, scale.data,...). Default is data
New data to insert
Seurat object with updated slot
# 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 DataLab