Classify each cell (i.e. each row) in a matrix of cancer cells into its most similar healthy developmental subpopulation.
Source:R/developmental_classifier_helpers.R
tof_classify_cells.Rd
This function uses a specified distance metric to classify each cell in a data.frame or matrix (`cancer_data`) into one of `nrow(classifier_fit)` subpopulations based on minimum distance, as described in this paper.
Usage
tof_classify_cells(
classifier_fit,
cancer_data,
distance_function = c("mahalanobis", "cosine", "pearson")
)
Arguments
- classifier_fit
A tibble produced by
tof_build_classifier
.- cancer_data
A matrix in which each row corresponds to a cell and each column corresponds to a measured CyTOF antigen.
- distance_function
A string indicating which of three distance functions should be used to calculate the distances between each row of `cancer_data` and the healthy developmental subpopulations corresponding to each row of `classifier_fit`.