plotBinning {epistack}R Documentation

plotBinning()

Description

Plot a vertical color bar of the bin column.

Usage

plotBinning(
  gr,
  target_height = 650,
  palette = colorRampPalette(c("magenta", "black", "green"))
)

Arguments

gr

a GRanges object containing a bin metadata column

target_height

an integer, the approximate height (in pixels) of the final plot. Used to avoid overplotting artefacts.

palette

a function taking a number as a first argument, and returning a vector of colors.

Value

Display a plot.

Examples

data("stackepi")
gr <- stackepi
gr <- addBins(gr, nbins = 3)
plot_bin <- plotBinning(gr)

gr2 <- data.frame(bin = rep(c(1,2,3,4), each = 5))
plotBinning(gr2, palette = colorRampPalette(c("blue4", "forestgreen", "coral3", "goldenrod")))


[Package epistack version 1.0.0 Index]