Skip to contents

Combines multiple track plots of the same region into a single grid. Uses the patchwork package to perform the alignment.

Usage

trackplot_combine(
  tracks,
  side_plot = NULL,
  title = NULL,
  side_plot_width = 0.3
)

Arguments

tracks

List of tracks in order from top to bottom, generally ggplots as output from the other trackplot_*() functions.

side_plot

Optional plot to align to the right (e.g. RNA expression per cluster). Will be aligned to the first trackplot_coverage() output if present, or else the first generic ggplot in the alignment. Should be in horizontal orientation and in the same cluster ordering as the coverage plots.

title

Text for overarching title of the plot

side_plot_width

Fraction of width that should be used for the side plot relative to the main track area

Value

A plot object with aligned genome plots. Each aligned row has the text label, y-axis, and plot body. The relative height of each row is given by heights. A shared title and x-axis are put at the top.