removeClustersAndDropLevels: Remove Clusters and Drop Levels from a List of Seurat Objects

View source: R/Seurat.Utils.R

removeClustersAndDropLevelsR Documentation

Remove Clusters and Drop Levels from a List of Seurat Objects

Description

This function removes residual small clusters from specified Seurat objects and drops levels in factor-like metadata.

Usage

removeClustersAndDropLevels(
  ls_obj,
  object_names = names(ls_obj),
  indices = 2:3,
  ...
)

Arguments

ls_obj

A list of Seurat objects.

object_names

A character vector containing the names of the Seurat objects to process. Default: names of all objects in the ls_obj.

indices

A numeric vector indicating which datasets to process by their position in the object_names vector. By default, it processes the second and third datasets.

...

Additional parameters passed to the removeResidualSmallClusters function.

Details

This function applies removeResidualSmallClusters and dropLevelsSeurat to the Seurat objects specified by the indices in the object_names. It operates in place, modifying the input ls_obj list.

Value

The function returns the modified list of Seurat objects.

Examples

## Not run: 
# Process the 2nd and 3rd datasets
removeClustersAndDropLevels(ls_obj, indices = c(2, 3))

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.