plotBoxMetric {epistack}R Documentation

plotBoxMetric()

Description

Plot distribution of a metric values as boxplots depending of bins. If the bin is absent from gr, a single boxplot is drawn.

Usage

plotBoxMetric(
  gr,
  metric = "expr",
  title = "Metric",
  trans_func = function(x) x,
  ylim = NULL,
  ylab = "metric",
  palette = colorRampPalette(c("magenta", "black", "green"))
)

Arguments

gr

a GRanges input

metric

name of the column in gr metadata containing scores.

title

title of the plot.

trans_func

A function to transform value of x before ploting. Useful to apply log10 transformation (i.e. with trans_func = function(x) log10(x+1)).

ylim

limit of the y axis; format: ylim = c(min, max)

ylab

y-axis title

palette

a function that returns a palette of n colors.

Value

Display a plot.

Examples

data("stackepi")
plotBoxMetric(
       stackepi,
       trans_func = function(x) x,
       metric = "exp",
       title = "Metric"
  )

[Package epistack version 1.0.0 Index]