plot_model_comparison_dotplot: Plot Model Comparison Dotplot

View source: R/plotH-M.R

plot_model_comparison_dotplotR Documentation

Plot Model Comparison Dotplot

Description

Overview dotplot to compare screening results of selected models.

Usage

plot_model_comparison_dotplot(
  data,
  eval = "mae",
  pval = "p_value",
  model_subset = NULL,
  model_remove = NULL,
  scale_factor = 1,
  pt_size = 1.5,
  label_vars = 2,
  label_size = 4,
  threshold_pval = 0.05,
  label_color = "#4d4d4d"
)

Arguments

data

Output of spatialAnnotationScreening() or spatialTrajectoryScreening() in the form of screening_results@results.

model_remove

(Optional) A character vector specifying models to remove from the plot.

scale_factor

A numeric value to scale the point sizes. Default is 1.

pt_size

The size of the points in the plot. Default is 0.1.

label_vars

The number of top variables to label for each model. Default is 2.

label_size

The size of the labels. Default is 4.

threshold_pval

The p-value threshold for coloring points. Default is 0.05.

label_color

The color of labels. Default is "#4d4d4d".

x_label

The label for the x-axis. Default is "Gene-model correlation".

Value

A dotplot comparing model screening results.

Examples

# Example usage:
pl <- plot_model_comparison_dotplot(screening_1@results, model_remove = c("peak"), label_vars = 3)
pl + coord_cartesian(xlim = c(0.5, 1))


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.