Skip to contents

This function stacks multiple genome tracks vertically, ensuring they share a common x-axis. It uses the aplot package for track stacking.

Usage

vstack_plot(..., region = NULL, heights = NULL)

Arguments

...

ggplot2 objects representing genome tracks

region

Genomic region to display (e.g., "chr1:1000000-2000000")

heights

Relative heights of the tracks (default: NULL, equal heights)

Value

A composite plot with stacked tracks

Examples

if (FALSE) { # \dontrun{
track1 <- ez_coverage("signal.bw", "chr1:1000000-2000000")
track2 <- ez_peak("peaks.bed", "chr1:1000000-2000000")
track3 <- ez_gene("genes.gtf", "chr1:1000000-2000000")
p <- vstack_plot(track1, track2, track3, region = "chr1:1000000-2000000")
} # }