Skip to contents

Plot the result of a DLBCLone classification

Usage

DLBCLone_train_test_plot(
  test_df,
  train_df,
  predictions_df,
  other_df,
  details,
  annotate_accuracy = FALSE,
  classes = c("BN2", "ST2", "MCD", "EZB", "N1"),
  label_offset = 2,
  title1 = "Original Class",
  title2 = "DLBCLone Predicted Class",
  title3 = "DLBCLone Predicted Class (Other)",
  base_size = 1
)

Arguments

test_df

Data frame containing the test data with UMAP coordinates

train_df

Data frame containing the training data with UMAP coordinates

predictions_df

Data frame containing the predictions with UMAP coordinates

other_df

Data frame containing the predictions for samples in the "Other" class

details

Single-row data frame with the best parameters from DLBCLone_optimize_params

annotate_accuracy

Set to true to add labels with accuracy values

classes

Vector of classes that were used in the training and testing

label_offset

Length of the label offset for the accuracy labels

title1

additional argument

title2

additional argument

title3

additional argument

Value

a ggplot object

Examples

if (FALSE) { # \dontrun{
#add the dataset name to the metadata if it's not already
#there (required for the plot work)
lymphgen_A53_DLBCLone$df$dataset = "GAMBL"

DLBCLone_train_test_plot(
 test_df = lymphgen_A53_DLBCLone$df,
 train_df = lymphgen_A53_DLBCLone$df,
 predictions_df = lymphgen_A53_DLBCLone$predictions,
 #other_df = lymphgen_A53_DLBCLone$predictions_other,
 #required only when "Other" was in the truth_classes
 details = lymphgen_A53_DLBCLone$best_params,
 classes = c("MCD","EZB","BN2","ST2","N1","A53","Other"),
 annotate_accuracy=TRUE,label_offset = 1)
} # }