This function sets data in a Seurat object, handling both V4 and V5 formats.
Usage
set_seurat_data(srt, data, layer = "data", assay = NULL)
Arguments
- srt
A Seurat object
- data
The data to set
- layer
The layer to set (e.g., "counts", "data", "scale.data")
- assay
Name of the assay. If NULL, uses the default assay.
Value
The modified Seurat object