Creates an interactive manhattan plot with multiple annotation options
manhattanly(
x,
...,
col = c("#969696", "#252525"),
point_size = 5,
labelChr = NULL,
suggestiveline = -log10(1e-05),
suggestiveline_color = "blue",
suggestiveline_width = 1,
genomewideline = -log10(5e-08),
genomewideline_color = "red",
genomewideline_width = 1,
highlight = NULL,
highlight_color = "#00FF00",
showlegend = FALSE,
showgrid = FALSE,
xlab = NULL,
ylab = "-log10(p)",
title = "Manhattan Plot"
)
Can be an object of class manhattanr
produced by the
manhattanr
function or a data.frame
which must contain
at least the following three columns:
the chromosome number
genomic base-pair position
a numeric quantity to plot such as a p-value or zscore
other parameters passed to manhattanr
A character vector indicating the colors of each chromosome. If the number of colors specified is less than the number of unique chromosomes, then the elements will be recycled. Can be Hex Codes as well.
A numeric
indicating the size of the points on the
plot. Default is 5
A character vector equal to the number of chromosomes
specifying the chromosome labels (e.g., c(1:22, "X", "Y", "MT")
).
Default is NULL
, meaning that the actual chromosome numbers will be
used.
Where to draw a "suggestive" line. Default is
-log10(1e-5)
. Set to FALSE
to disable.
color of "suggestive" line. Only used if
suggestiveline
is not set to FALSE
. Default is "blue"
.
Width of suggestiveline
. Default is 1.
Where to draw a "genome-wide sigificant" line. Default
-log10(5e-8)
. Set to FALSE
to disable.
color of "genome-wide sigificant" line. Only used
if genomewideline
is not set to FALSE
. Default is
"red"
.
Width of genomewideline
. Default is 1.
A character vector of SNPs in your dataset to highlight.
These SNPs should all be in your dataset. Default is NULL
which
means that nothing is highlighted.
Color used to highlight points. Only used if
highlight
argument has been specified
Should a legend be shown. Default is FALSE
.
Should gridlines be shown. Default is FALSE
.
X-axis label. Default is NULL
which means that the label
is automatically determined by the manhattanr
function.
Specify here to overwrite the default.
Y-axis label. Default is "-log10(p)"
.
Title of the plot. Default is "Manhattan Plot"
An interactive manhattan plot.
# NOT RUN {
library(manhattanly)
manhattanly(HapMap)
# highlight SNPs of interest
# 'signigicantSNP' is a character vector of SNPs included in this package
manhattanly(HapMap, snp = "SNP", highlight = significantSNP)
# }
Run the code above in your browser using DataLab