.check_and_rename | R Documentation |
This function renames rows (genes) in a specified slot of a Seurat assay object. It supports slots storing data as either a dense or a sparse matrix (dgCMatrix) or data.frame.
.check_and_rename(obj, assay, newnames, layer.name)
obj |
A Seurat object. |
assay |
An Assay name in a Seurat object. |
newnames |
A character vector of new gene names to be assigned. |
layer.name |
A string specifying the slot in the Assay object to be updated. Valid options typically include 'counts', 'data', or 'scale.data'. |
An Assay object with updated gene names in the specified slot.
## Not run:
# Assuming 'seurat_obj' is a Seurat object and 'new_gene_names' is a vector of gene names
updated_assay <- check_and_rename(
assayobj = seurat_obj[["RNA"]],
newnames = new_gene_names,
layer.name = "counts"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.