gg_addgenes {locuszoomr} | R Documentation |
Add gene tracks to a ggplot2 plot
Description
Adds gene tracks to an existing ggplot2 plot.
Usage
gg_addgenes(p, loc, heights = c(3, 2), ...)
Arguments
p |
ggplot2 plot object. This can be generated by |
loc |
Object of class 'locus' to use for plot. See |
heights |
Vector specifying ratio of heights of upper plot and lower gene track. |
... |
Additional arguments passed to |
Value
A ggplot2 plotting object.
See Also
Examples
if(require(EnsDb.Hsapiens.v75)) {
data(SLE_gwas_sub)
loc <- locus(SLE_gwas_sub, gene = 'IRF5', flank = c(7e4, 2e5), LD = "r2",
ens_db = "EnsDb.Hsapiens.v75")
p <- gg_scatter(loc)
gg_addgenes(p, loc)
}
[Package locuszoomr version 0.3.1 Index]