Skip to contents

Generates a simple UMAP scatterplot for visualizing sample clustering or separation.

Usage

basic_umap_scatterplot(
  optimized,
  plot_samples = NULL,
  colour_by = NULL,
  truth_column = "lymphgen",
  pred_column = "DLBCLone_ko",
  other_label = "Other",
  title = "UMAP based on selected features",
  use_plotly = TRUE,
  custom_colours = NULL
)

Arguments

optimized

Data frame containing at least V1, V2, sample_id, and grouping columns.

plot_samples

Optional character vector of sample_ids to label in the plot

colour_by

Column name to color points by. Defaults to truth_column.

truth_column

Name of the truth/ground-truth column (default: "lymphgen").

pred_column

Name of the predicted-class column (default: "DLBCLone_ko").

other_label

Label used for the outgroup/unclassified class (default: "Other").

title

Plot title.

use_plotly

Logical; if FALSE and plot_samples provided, draw static labels.

custom_colours

Optional named vector of colors for groups; falls back to get_gambl_colours().

Value

A ggplot object.

Examples


if (FALSE) { # \dontrun{
my_umap = make_and_annotate_umap(my_data, my_metadata)

basic_umap_scatterplot(my_umap$df,
                       plot_samples = "some_sample_ID",
                       colour_by = "DLBCLone_ko")
} # }