|
data_matrix <- as.matrix(GetAssayData(X, slot)) |
Here,should add the
data_matrix <- as.matrix(GetAssayData(X, slot=slot))
or it will return bug with
r$> data_matrix <- as.matrix(GetAssayData(brain, "data"))
Error in `GetAssayData()`:
! `assay` must be one of "Spatial" or "SCT", not "data".