removeResidualSmallClusters | R Documentation |
Removes clusters containing fewer cells than specified by max.cells
from a Seurat object. This function is particularly useful after subsetting a dataset,
where small, possibly unrepresentative clusters may remain.
removeResidualSmallClusters(
obj = combined.obj,
identitites = GetClusteringRuns(obj, pat = "*snn_res.[0-9].[0-9]$")[1:5],
max.cells = max(round((ncol(obj))/2000), 5),
plot.removed = TRUE
)
obj |
Seurat object from which small clusters will be removed. Default: |
identitites |
Vector of clustering identities to examine for small clusters;
Default: |
max.cells |
Maximum number of cells a cluster can contain to still be considered for removal. Default: The lesser of 0.5% of the dataset or 10 cells. |
plot.removed |
Logical indicating if a umap of the cells removed should be plotted. |
## Not run:
if (interactive()) {
combined.obj <- removeResidualSmallClusters(obj = combined.obj)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.