Description Usage Arguments Value Examples
Create mirrored Manhattan plots for PheWAS 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 27 28 29 30 | phemirror(
top,
bottom,
phegroup,
tline,
bline,
chroms = c(1:22, "X", "Y"),
log10 = TRUE,
yaxis,
opacity = 1,
annotate_snp,
annotate_p,
highlight_snp,
highlight_p,
highlighter = "red",
toptitle = NULL,
bottomtitle = NULL,
chrcolor1 = "#AAAAAA",
chrcolor2 = "#4D4D4D",
groupcolors,
freey = FALSE,
background = "variegated",
chrblocks = TRUE,
file = "phemirror",
type = "png",
hgtratio = 0.5,
hgt = 7,
wi = 12,
res = 300
)
|
top |
data frame, must contain PHE, SNP, CHR, POS, pvalue, columns, optional Shape |
bottom |
data frame, must contain PHE, SNP, CHR, POS, pvalue, columns, optional Shape |
phegroup |
optional grouping dataframe for phenotypes, must contain PHE and Group columns |
tline |
list of pvalues to draw red threshold lines in top plot |
bline |
list 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-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) |
highlight_snp |
vector of snps to highlight |
highlight_p |
list of pvalue thresholds to annotate in the order of c(p_top, p_bottom) |
highlighter |
color to highlight |
toptitle |
optional string for top plot title |
bottomtitle |
optional string for bottom plot title |
chrcolor1 |
first alternating color for chromosome |
chrcolor2 |
second alternating color for chromosome |
groupcolors |
named vector of colors where names correspond to data in 'PHE' or 'Group' column |
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 |
type |
plot type/extension |
hgtratio |
height ratio of plots, equal to top plot proportion |
hgt |
height of plot in inches |
wi |
width of plot in inches |
res |
resolution of plot in pixels per inch |
png image
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.