subsetSeuObjByIdent | R Documentation |
Subsets a Seurat object based on a specified identity column and values. It allows for an optional inversion of the selection.
subsetSeuObjByIdent(
obj = combined.obj,
ident = GetClusteringRuns()[1],
identGroupKeep,
invert = FALSE
)
obj |
A Seurat object. Default: |
ident |
The name of the identity column to use for subsetting. It is recommended to
specify this explicitly. Default: First entry from the result of |
identGroupKeep |
A vector of cluster values for which cells should be matched and retained. This parameter does not have a default value and must be specified. |
invert |
A logical indicating whether to invert the selection, keeping cells that do
not match the specified identity values. Default: |
A Seurat object subsetted based on the specified identity and identity values.
# Assuming `seurat_obj` is your Seurat object and you want to subset based on cluster 1
subsetted_obj <- subsetSeuObjByIdent(
obj = seurat_obj, ident = "your_ident_column",
identGroupKeep = c(1), invert = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.