Extract counts matrix from Seurat object, compatible with both V4 and V5
Usage
get_counts_from_seurat(object, assay = NULL, layer = "counts")
Arguments
- object
A Seurat object
- assay
Assay to use (default: DefaultAssay)
- layer
Layer/slot to extract (default: "counts")
Value
A sparse matrix (cells x genes after transpose)