getDataMatrix {GeneNMF} | R Documentation |
Extract data matrix from Seurat object
Description
Get the gene expression matrix from a Seurat object, optionally centered and/or subset on highly variable genes
Usage
getDataMatrix(
obj,
assay = "RNA",
slot = "data",
hvg = NULL,
center = FALSE,
scale = FALSE,
non_negative = TRUE
)
Arguments
obj |
Seurat object |
assay |
Get data matrix from this assay |
slot |
Get data matrix from this slot (=layer) |
hvg |
List of variable genes to subset the matrix. If NULL, uses all genes |
center |
Whether to center the data matrix |
scale |
Whether to scale the data matrix |
non_negative |
Enforce non-negative values for NMF |
Value
Returns a sparse data matrix (cells per genes), subset according to the given parameters
Examples
data(sampleObj)
matrix <- getDataMatrix(sampleObj)
[Package GeneNMF version 0.6.0 Index]