Convenience function to extract MAGIC-imputed data from a
Seurat object.
Usage
GetMAGICData(
object,
assay = "MAGIC_RNA",
genes = NULL,
cells = NULL,
as_matrix = TRUE
)
Arguments
- object
Seurat object that has been processed with magic()
- assay
Name of the MAGIC assay. Default is "MAGIC_RNA".
- genes
Genes to extract. Default is NULL (all genes).
- cells
Cells to extract. Default is NULL (all cells).
- as_matrix
Logical. Return as matrix instead of data.frame? Default TRUE.
Value
Matrix or data.frame of MAGIC-imputed expression values (cells x genes).
Examples
if (FALSE) { # \dontrun{
# After running magic() on Seurat object
imputed_data <- GetMAGICData(seurat_obj)
imputed_subset <- GetMAGICData(seurat_obj, genes = c("Gene1", "Gene2"))
} # }