This function adds a vertical line to a genome track at a specific position.
It is useful for highlighting specific genomic positions.
Usage
add_vline(
plot,
position,
color = "red",
linewidth = 0.5,
linetype = "dashed",
alpha = 0.7
)
Arguments
- plot
A ggplot2 object representing a genome track
- position
Genomic position for the vertical line
- color
Color of the line (default: "red")
- linetype
Line type (default: "dashed")
- alpha
Transparency (default: 0.7)
- size
Size of the line (default: 0.5)
Value
A ggplot2 object with the vertical line added
Examples
if (FALSE) { # \dontrun{
track <- ez_coverage("signal.bw", "chr1:1000000-2000000")
track <- add_vline(track, 1500000)
} # }