prefix_cells_seurat | R Documentation |
Adds prefixes derived from a vector of identifiers to cell names in a list of Seurat objects. This is useful for ensuring unique cell names across multiple samples or conditions when combining or comparing datasets.
prefix_cells_seurat(ls_obj, obj_IDs)
ls_obj |
List of Seurat S4 objects to which prefixes will be added. Each object should correspond to a different sample or condition. |
obj_IDs |
Character vector of identifiers that will be used as prefixes. Each identifier in the vector
corresponds to a Seurat object in |
A list of Seurat objects with updated cell names, incorporating the specified prefixes.
## Not run:
# Assuming seurat_obj1 and seurat_obj2 are Seurat objects
ls_obj <- list(seurat_obj1, seurat_obj2)
obj_IDs <- c("sample1", "sample2")
ls_obj_prefixed <- prefix_cells_seurat(ls_obj = ls_obj, obj_IDs = obj_IDs)
# Now each cell name in seurat_obj1 and seurat_obj2 will be prefixed with 'sample1_' and 'sample2_', respectively.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.