Produces a barplot showing how query regions of interest are distributed relative to the expected distribution across a given partition list

plotExpectedPartitions(expectedPartitions, feature_names = NULL, pval = FALSE)

Arguments

expectedPartitions

A data.frame holding the frequency of assignment to each of the partitions, the expected number of each partition, and the log10 of the observed over expected. Produced by calcExpectedPartitions.

feature_names

Character vector with labels for the partitions (optional). By default it will use the names from the first argument.

pval

Logical indicating whether Chi-square p-values should be added for each partition.

Value

A ggplot object using a barplot to show the distribution of the query regions across a given partition list.

Examples

p = calcExpectedPartitionsRef(vistaEnhancers, "hg19")
#> Warning: Chi-squared approximation may be incorrect
expectedPlot = plotExpectedPartitions(p)