tof_classify_cells: Classify each cell (i.e. each row) in a matrix of cancer...

View source: R/developmental_classifier_helpers.R

tof_classify_cellsR Documentation

Classify each cell (i.e. each row) in a matrix of cancer cells into its most similar healthy developmental subpopulation.

Description

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.


keyes-timothy/tidytof documentation built on March 31, 2024, 12:01 p.m.