This function is a wrapper around ggplot geom_density_ridges or geom_violin to allow for plotting group distribution plots in ArchR.

ggGroup(
  x = NULL,
  y = NULL,
  xlabel = NULL,
  ylabel = NULL,
  groupOrder = NULL,
  groupSort = FALSE,
  size = 1,
  baseSize = 10,
  ridgeScale = 1,
  ratioYX = NULL,
  alpha = 1,
  title = "",
  pal = paletteDiscrete(values = x, set = "stallion"),
  addBoxPlot = TRUE,
  plotAs = "ridges",
  ...
)

Arguments

x

A character vector containing the categorical x-axis values for each y-axis value.

y

A numeric vector containing the y-axis values for each point.

xlabel

The label to plot for the x-axis.

ylabel

The label to plot for the y-axis.

groupOrder

A character vector indicating a custom order for plotting x-axis categorical values. Should contain all possible values of x in the desired order.

groupSort

A boolean indicating whether to sort groups based on the average value of the group.

size

The line width for boxplot/summary lines.

baseSize

The base font size (in points) to use in the plot.

ridgeScale

A numeric indicating the relative size for each ridge in the ridgeplot.

ratioYX

The aspect ratio of the x and y axes on the plot.

alpha

A number indicating the transparency to use for each point. See ggplot2 for more details.

title

The title of the plot.

pal

A named custom palette (see paletteDiscrete() and ArchRPalettes) for discrete coloring.

addBoxPlot

A boolean indicating whether to add a boxplot to the plot if plotAs="violin".

plotAs

A string indicating how the groups should be plotted. Acceptable values are "ridges" (for a ggrides-style plot) or "violin" (for a violin plot).

...

Additional parameters to pass to ggplot2 for plotting.