Extract Expression Matrix from Seurat, SummarizedExperiment, or Matrix
Source:R/compute_ranked_matrix.R
ExtractData.RdExtracts a gene expression matrix from a Seurat object
(default assay and "data" slot),
a SummarizedExperiment object (assay named "logcounts"),
or returns the input matrix if it is already a dense or sparse matrix.
Value
A numeric gene expression matrix (dense or sparse), with genes as rows and cells or spots as columns.
Examples
seu_sc <- readRDS(system.file("extdata", "seu_sc.rds",
package = "RankMap"
))
# From Seurat object:
mat <- extractData(seu_sc)