Skip to contents

Generates a heatmap of feature values for the nearest neighbors of a specified sample, based on a DLBCLone model object. Supports outputs from:

  • DLBCLone_KNN (with predict_unlabeled = TRUE)

  • DLBCLone_optimize_params

  • predict_single_sample_DLBCLone

Usage

nearest_neighbor_heatmap(
  this_sample_id,
  DLBCLone_model,
  truth_column = "lymphgen",
  metadata_cols = NULL,
  clustering_distance = "binary",
  font_size = 14,
  gene_orientation = "column",
  cluster_rows = TRUE,
  cluster_columns = TRUE,
  show_legend = FALSE,
  draw = TRUE,
  keep_metafeatures = FALSE
)

Arguments

this_sample_id

Character. The sample ID for which to plot the nearest neighbor heatmap.

DLBCLone_model

List. A DLBCLone model object as described above.

truth_column

Character. Column name in predictions/metadata to use as truth (default "lymphgen").

metadata_cols

Optional character vector of additional metadata columns to annotate on rows.

clustering_distance

Distance for row clustering (default "binary").

font_size

Numeric. Font size for labels (default 14).

Value

A ComplexHeatmap object (drawn).