Skip to contents

This function plots a boxplot of the ATAC difference (response) against the energy levels of a given motif. If subtitle=NULL, the subtitle will be set to a kologorov-smirnov test between the lowest (0-3) and highest (9-10) energy levels.

Usage

plot_motif_energy_vs_response_boxplot(
  traj_model,
  motif,
  xlab = paste(motif, "energy"),
  ylab = "ATAC difference",
  ylim = c(-0.5, 0.5),
  fill = "lightblue1",
  title = "",
  subtitle = NULL,
  outliers = TRUE
)

Arguments

traj_model

The trajectory model object.

motif

The motif to plot the energy levels for.

xlab

The label for the x-axis (default is the motif name followed by "energy").

ylab

The label for the y-axis (default is "ATAC difference").

ylim

The limits for the y-axis (default is -0.5 to 0.5).

fill

The fill color for the boxplot (default is "lightblue1").

title

The title for the plot.

subtitle

The subtitle for the plot (default is a kologorov-smirnov test between the lowest and highest energy levels). The color of the subtitle will be set to "darkred" if the p-value is less than 0.01.

outliers

Whether to plot outliers (default is TRUE).

Value

A ggplot object representing the boxplot.