Skip to contents

This function adds a horizontal line to a genome track at a specific y-value. It is useful for highlighting specific signal thresholds.

Usage

add_hline(
  plot,
  y,
  color = "blue",
  size = 0.5,
  linetype = "dashed",
  alpha = 0.7
)

Arguments

plot

A ggplot2 object representing a genome track

y

Y-value for the horizontal line

color

Color of the line (default: "blue")

size

Size of the line (default: 0.5)

linetype

Line type (default: "dashed")

alpha

Transparency (default: 0.7)

Value

A ggplot2 object with the horizontal line added

Examples

if (FALSE) { # \dontrun{
track <- ez_coverage("signal.bw", "chr1:1000000-2000000")
track <- add_hline(track, 10)
} # }