ExtendGates: Extend gating to unassigned cells

Description Usage Arguments See Also

View source: R/99_kNNGating.R

Description

Uses a k-NN classifier to label cells that are marked as 'unassigned' in an existing manual annotation vector. A majority vote is taken among nearest neighbours to an unassigned cells, excluding other unassigneds. This procedure can be repeated in multiple consecutive iterations.

Usage

1
2
3
4
5
6
7
8
9
ExtendGates(
  exprs,
  annotation,
  unassigned_labels,
  knn_indices,
  k = NULL,
  n_iter = 1,
  verbose = TRUE
)

Arguments

exprs

numeric matrix: a coordinate matrix of biological expression data (columns correspond to markers, rows correspond to cells)

annotation

string or factor vector: vector of labels per each row of exprs

unassigned_labels

string or string vector: names of population labels to handle as 'unassigned' events (not belonging to a manually annotated population)

knn_indices

numeric matrix: the Indices slot of a k-NN object produced by the function ComputekNNMatrix

k

integer: number of nearest neighbours of each point to use for labelling. Default value is the maximum possible value (k of the k-NN matrix)

n_iter

integer: number of labelling iterations. Default value is 1

verbose

logical: whether to display progress messages. Default value is TRUE

See Also


davnovak/SingleBench documentation built on Dec. 19, 2021, 9:10 p.m.