Skip to contents

Make UMAP scatterplot

Usage

make_umap_scatterplot(
  df,
  drop_composite = TRUE,
  colour_by = "lymphgen",
  drop_other = FALSE,
  high_confidence = FALSE,
  custom_colours,
  add_labels = FALSE,
  title = NULL,
  base_size = 8,
  alpha = 0.8
)

Arguments

df

Data frame containing UMAP coordinates (V1, V2) and grouping columns. Typically this is the df element from the output of make_and_annotate_umap().

drop_composite

Logical; if TRUE, drops samples with composite labels (e.g., "EZB-COMP").

colour_by

Column name to color points by (default: "lymphgen").

drop_other

Logical; if TRUE, drops (hides) samples with "Other" labels.

high_confidence

Logical; if TRUE, only includes samples with high confidence predictions.

custom_colours

Named vector of custom colors for each group.

add_labels

Logical; if TRUE, adds labels to points.

title

Plot title.

base_size

Base font and point size for the plot (passed to theme_Morons()).

alpha

Point transparency (default: 0.8).

Value

A ggplot object.

Examples


if (FALSE) { # \dontrun{
my_umap = make_and_annotate_umap(my_data, my_metadata)
p = make_umap_scatterplot(my_umap$df,
                          colour_by = "lymphgen",
                          drop_other = TRUE)
print(p)
} # }