filterSingle: Filter singleton cells from the UMAP embedding

View source: R/cluster.R

filterSingleR Documentation

Filter singleton cells from the UMAP embedding

Description

This function removes cells from the UMAP embedding that are not well supported by other cells. Can be run on a per cluster basis to filter cells that exceed a heuristic threshold of distances to most other cells in the same cluster.

Usage

filterSingle(
  pro,
  k = 50,
  threshold = 3,
  type = "umap",
  m1 = "umap1",
  m2 = "umap2"
)

Arguments

pro

data.frame containing UMAP coordinates m1, and m2. See m1, m2 arguments for details.

k

numeric, number of nearest neighbors. Defaults to 50.

threshold

numeric, Z-score threshold to remove cells greater than X standard standard deviations from other cells.

type

character, which embedding to use. Must be one of "umap", "pca", or "tsne".

m1

character, if type=="umap", then set to the column name of first component ("umap1"). Only used when running sub-clustering (umap embedding names for subset and regenerated UMAP embeddings of a subset of cells).

m2

character, if type=="umap", then set to the column name of second component ("umap2"). #' Only used when running sub-clustering (umap embedding names for subset and regenerated UMAP embeddings of a subset of cells).


plantformatics/Socrates documentation built on April 3, 2025, 1:02 p.m.