RemoveGenesSeurat | R Documentation |
Removes specified genes from the metadata, counts, data, and scale.data slots of a Seurat object. This operation is typically performed prior to data integration to ensure that gene sets are consistent across multiple datasets. The function modifies the Seurat object in place.
RemoveGenesSeurat(obj = ls.Seurat[[i]], symbols2remove = c("TOP2A"))
obj |
A Seurat object. Default: |
symbols2remove |
A character vector specifying the genes to be removed from the Seurat object;
Default: |
This function directly modifies the @counts
, @data
, and @scale.data
slots within
the RNA assay of the provided Seurat object, as well as the @meta.data
slot. It's important to run
this function as one of the initial steps after creating the Seurat object and before proceeding
with downstream analyses or integration processes.
A Seurat object with the specified genes removed from the mentioned slots.
## Not run:
if (interactive()) {
# Assuming `SeuratObj` is your Seurat object and you want to remove the gene "TOP2A"
updatedSeuratObj <- RemoveGenesSeurat(obj = SeuratObj, symbols2remove = "TOP2A")
# Now `updatedSeuratObj` does not contain "TOP2A" in the specified slots
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.