tof_build_classifier: Calculate centroids and covariance matrices for each cell...

View source: R/developmental_classifier_helpers.R

tof_build_classifierR Documentation

Calculate centroids and covariance matrices for each cell subpopulation in healthy CyTOF data.

Description

This function takes a 'tibble' or 'tof_tibble' storing healthy cell measurements in each of its rows and a vector ('healthy_cell_labels') representing the cell subpopulation to which each cell belongs. It uses these values to calculate several values required to perform "developmental classification" as described in this paper.

Usage

tof_build_classifier(
  healthy_tibble = NULL,
  healthy_cell_labels = NULL,
  classifier_markers = where(tof_is_numeric),
  verbose = FALSE
)

Arguments

healthy_tibble

A 'tibble' or 'tof_tibble' containing cells from only healthy control samples (i.e. not disease samples).

healthy_cell_labels

A character or integer vector of length 'nrow(healthy_tibble)'. Each entry in this vector should represent the cell subpopulation label (or cluster id) for the corresponding row in 'healthy_tibble'.

classifier_markers

Unquoted column names indicating which columns in 'healthy_tibble' to use in the developmental classification. Defaults to all numeric columns in 'healthy_tibble'. Supports tidyselect helpers.

verbose

A boolean value indicating if updates should be printed to the console during classification. Defaults to FALSE.

Value

A tibble with three columns: population (id of the healthy cell population), centroid (the centroid vector for that cell population), and covariance_matrix (the covariance matrix for that cell population)


keyes-timothy/tidytof documentation built on Aug. 28, 2024, 8:37 a.m.