Description Usage Arguments Value Examples
Setter for multimodal data
1 2 3 4 5 6 7 | SetAssayData(object, ...)
## S3 method for class 'Assay'
SetAssayData(object, slot, new.data, ...)
## S3 method for class 'Seurat'
SetAssayData(object, slot = "data", new.data, assay = NULL, ...)
|
object |
An object |
... |
Arguments passed to other methods |
slot |
Where to store the new data |
new.data |
New data to insert |
assay |
Name of assay whose data should be set |
object with the assay data set
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Set an Assay slot directly
count.data <- GetAssayData(object = pbmc_small[["RNA"]], slot = "counts")
count.data <- as.matrix(x = count.data + 1)
new.assay <- SetAssayData(object = pbmc_small[["RNA"]], slot = "counts", new.data = count.data)
# Set an Assay slot through the Seurat object
count.data <- GetAssayData(object = pbmc_small[["RNA"]], slot = "counts")
count.data <- as.matrix(x = count.data + 1)
new.seurat.object <- SetAssayData(
object = pbmc_small,
slot = "counts",
new.data = count.data,
assay = "RNA"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.