addProcessedMatrix | R Documentation |
Adds a processed matrix to the chosen molecular assay of the object.
addProcessedMatrix(
object,
proc_mtr,
mtr_name,
assay_name = activeAssay(object),
overwrite = FALSE,
...
)
object |
An object of class |
mtr_name |
A character value that denotes the name of the matrix with
which one can refer to it in subsequent functions via |
assay_name |
Only relevant if the |
overwrite |
Logical value. Must be |
... |
Used to absorb deprecated arguments or functions. |
expr_mtr |
A matrix in which the rownames correspond to the feature names and the column names correspond to the barcodes. |
The updated input object, containing the added, removed or computed results.
library(SPATA2)
library(tidyverse)
data("example_data")
object <- example_data$object_UKF275T_diet
library(Seurat)
scaled_mtr <-
CreateSeuratObject(getCountMatrix(object)) %>%
NormalizeData() %>%
ScaleData() %>%
GetAssayData(layer = "scale.data")
object <- addProcessedMatrix(object, proc_mtr = scaled_mtr, mtr_name = "scaled")
p1 <- plotSurface(object, color_by = "METRN")
object <- activateMatrix(object, mtr_name = "scaled")
p2 <- plotSurface(object, color_by = "METRN")
plot(p1)
plot(p2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.