plotQTHist: Plot quantile-trimmed histogram

View source: R/qthist.R

plotQTHistR Documentation

Plot quantile-trimmed histogram

Description

Given the results from calcWidth, plots a histogram with outliers trimmed.

Usage

plotQTHist(
  x,
  EndBarColor = "gray57",
  MiddleBarColor = "gray27",
  quantThresh = NULL,
  bins = NULL,
  indep = FALSE,
  numbers = FALSE
)

Arguments

x

Data values to plot - vector or list of vectors

EndBarColor

Color for the quantile bars on both ends of the graph (optional)

MiddleBarColor

Color for the bars in the middle of the graph (optional)

quantThresh

Quantile of data to be contained in each end bar (optional) quantThresh values must be under .2, optimal size is under .1

bins

The number of bins for the histogram to allocate data to. (optional)

indep

logical value which returns a list of plots that have had their bins calculated independently; the normal version will plot them on the same x and y axis.

numbers

a logical indicating whether the raw numbers should be displayed, rather than percentages (optional).

Details

x-axis breaks for the frequency calculations are based on the "divisions" results from helper function calcDivisions.

Value

A ggplot2 plot object

Examples

regWidths = calcWidth(vistaEnhancers)
qtHist = plotQTHist(regWidths)
qtHist2 = plotQTHist(regWidths, quantThresh=0.1)

databio/GenomicDistributions documentation built on April 30, 2024, 4:34 a.m.