Description Usage Arguments Value Examples
Create mirrored Manhattan plots for GWAS Dependencies: ggplot2, gridExtra Suggested: ggrepel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | igmirror(
top,
bottom,
tline,
bline,
chroms = c(1:22, "X", "Y"),
log10 = TRUE,
yaxis,
opacity = 1,
annotate_snp,
annotate_p,
toptitle = NULL,
bottomtitle = NULL,
highlight_snp,
highlight_p,
highlighter = "red",
chrcolor1 = "#AAAAAA",
chrcolor2 = "#4D4D4D",
freey = FALSE,
background = "variegated",
chrblocks = FALSE,
file = "gmirror",
hgt = 7,
hgtratio = 0.5,
wi = 12
)
|
top |
data frame, must contain: SNP, CHR, POS, pvalue, columns; optional: Shape, Hover, and Link |
bottom |
data frame, must contain: SNP, CHR, POS, pvalue, columns; optional: Shape, Hover, and Link |
tline |
list of pvalues to draw red threshold lines in top plot |
bline |
ist of pvalues to draw red threshold lines in bottom plot |
chroms |
list of chromosomes to plot in the order desired, default c(1:22, "X", "Y") |
log10 |
plot -log10() of pvalue column, logical |
yaxis |
label for y-axis in the format c("top", "bottom"), automatically set if log10=TRUE |
opacity |
opacity of points, from 0 to 1, useful for dense plots |
annotate_snp |
vector of RSIDs to annotate |
annotate_p |
list of pvalue thresholds to annotate in the order of c(p_top, p_bottom) |
toptitle |
optional string for top plot title |
bottomtitle |
optional string for bottom plot title |
highlight_snp |
vector of snps to highlight |
highlight_p |
list of pvalue thresholds to highlight in the order of c(p_top, p_bottom) |
highlighter |
color to highlight |
chrcolor1 |
first alternating color for chromosome |
chrcolor2 |
second alternating color for chromosome |
freey |
allow y-axes to scale with the data |
background |
variegated or white |
chrblocks |
logical, turns on x-axis chromosome marker blocks |
file |
file name of saved image |
hgt |
height of plot in inches |
hgtratio |
height ratio of plots, equal to top plot proportion |
wi |
width of plot in inches |
png image
1 2 3 4 5 6 7 | data(gwas.t)
data(gwas.b)
gwas.t$Link <- paste0("https://www.ncbi.nlm.nih.gov/snp/", gwas.t$SNP)
gwas.b$Link <- paste0("https://www.ncbi.nlm.nih.gov/snp/", gwas.b$SNP)
igmirror(top=gwas.t, bottom=gwas.b, tline=0.05/nrow(gwas.t), bline=0.05/nrow(gwas.b),
toptitle="GWAS Comparison Example: Data 1", bottomtitle = "GWAS Comparison Example: Data 2",
highlight_p = c(0.05/nrow(gwas.t), 0.05/nrow(gwas.b)), highlighter="green")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.