Skip to contents

Draws epilogos per-state scores as stacked bars spanning each bin, one color per chromatin state. Positive and negative scores, as in epilogos group comparisons, are stacked separately above and below zero. Data is in long format with one row per bin and state; use epilogos_long() to convert epilogos output. xmin, xmax, y, and fill default to the start, end, score, and state columns.

Pair with scale_fill_chromhmm() for state colors. Also adds an "Epilogos" y-axis title; add your own labs() after it to override it.

Usage

geom_epilogo_col(
  mapping = NULL,
  data = NULL,
  background = "black",
  ...,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE
)

Arguments

mapping

Set of aesthetic mappings created by ggplot2::aes().

data

GRanges object or data frame of epilogos scores in long format, e.g. from epilogos_long().

background

Fill color of the panel behind the bars, default: "black". Use NA for none.

...

Other arguments passed to ggplot2::layer(), e.g. alpha.

na.rm, show.legend, inherit.aes

See ggplot2::layer().

Value

List of ggplot2 layers and a y-axis title, added to a plot with +

Examples

if (FALSE) { # \dontrun{
scores <- data.table::fread("scores_mm_epilogos.chr3.txt.gz")

ggplot2::ggplot(epilogos_long(scores)) +
  geom_epilogo_col() +
  scale_fill_chromhmm() +
  coord_locus("chr3:187734001-187751500", flank = 5000) +
  theme_genomic()
} # }