plotBoxMetric: plotBoxMetric()

View source: R/plotBoxMetric.R

plotBoxMetricR 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(
  rse,
  metric = "expr",
  title = "Metric",
  trans_func = function(x) x,
  ylim = NULL,
  ylab = "metric",
  palette = colorRampPalette(c("#DF536B", "black", "#61D04F"))
)

Arguments

rse

a RangedSummarizedExperiment input. Aletrnatively: can be a GRanges object (for backward compatibility).

metric

name of the column in rse 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 vector of colors, or 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"
  )

GenEpi-GenPhySE/epistack documentation built on July 27, 2023, 1:09 a.m.