Filter cells that exceed N median absolute deviations from cluster center in UMAP coordinate space. Assumes that Seurat::FindClusters() has already been run.

cleanCluster(object, mad.threshold = 3, return.plots = F, verbose = T)

Arguments

object

Seurat object.

mad.threshold

Filter threshold. Represents minimal number of median absolute deviations from median required to omit cell from object. Default is 3.

return.plots

Logical indicating whether to return plots. If true, returns list containing object along with ggplot handles. If false, only filtered object is returned.

verbose

Logical indicating whether to print progress messages.

Value

list (return.plots == T) or seurat object (return.plots == F)

Author

Nicholas Mikolajewicz