Skip to contents

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`.

Value

A data.frame in which each column represents the distance between a cell in the input data and each healthy subpopulation cells are being classified into.