gg_addgenes | R Documentation |
Adds gene tracks to an existing ggplot2 plot.
gg_addgenes(p, loc, heights = c(3, 2), ...)
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 |
A ggplot2 plotting object.
gg_scatter()
gg_genetracks()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.