Skip to contents

Applies a previously trained supervised Gaussian mixture model (GMM) to UMAP-projected data for DLBCLone subtypes. Assigns class predictions and optionally reclassifies samples as "Other" based on probability and density thresholds.

Usage

DLBCLone_predict_mixture_model(
  model,
  umap_out,
  probability_threshold = 0.5,
  density_max_threshold = 0.05,
  cohort = NULL
)

Arguments

model

Fitted MclustDA model object, as returned by DLBCLone_train_mixture_model.

umap_out

List. Output from make_and_annotate_umap, containing a data frame with UMAP coordinates for the samples to be classified with the model. This must be projected using the same UMAP model that was generated using the training data.

probability_threshold

Numeric. Minimum posterior probability required to assign a class (default: 0.5).

density_max_threshold

Numeric. Minimum maximum density required to assign a class (default: 0.05).

cohort

Optional character. Cohort label to annotate predictions.

Value

A list with:

gaussian_mixture_model

Fitted MclustDA model object

predictions

Data frame with sample IDs, UMAP coordinates, predicted classes, and thresholded assignments

probability_threshold

Probability threshold used for "Other" assignment

Details

  • Uses the provided MclustDA model to predict class membership for each sample in the UMAP projection.

  • Computes per-class densities and posterior probabilities for each sample.

  • Samples with low maximum probability or density are reclassified as "Other".

  • Returns both raw and thresholded class assignments, respectively under the columns DLBCLone_g and DLBCLone_go.

Examples

# Predict on new UMAP data using a trained mixture model:
if (FALSE) { # \dontrun{
result <- DLBCLone_predict_mixture_model(model, umap_out)
head(result$predictions)
} # }