Creates an interactive Q-Q plot with multiple annotation options
qqly(
x,
...,
col = "#252525",
size = 5,
type = 20,
abline_col = "red",
abline_size = 1,
abline_type = "solid",
highlight = NULL,
highlight_color = "#00FF00",
xlab = "Expected -log10(p)",
ylab = "Observed -log10(p)",
title = "Q-Q Plot"
)
Can be an object of class qqr
produced by the
qqr
function or a data.frame
which must contain at
least the following column:
a p-value, must be numeric
other parameters passed to qqr
A character
indicating the color of the points. Can
be Hex Codes as
well.
A numeric
specifying the size of the points. Default
is 1
An integer between 0 and 25 specifying the point shape. Default is 20 (filled circle). Deprecated.
A character
indicating the color of the 45 degree
diagonal line. Can be
Hex Codes as
well. Default is "red"
.
A numeric
indicating the size of the 45 degree
diagonal line. Default is 0.5.
Sets the line type of the 45 degree line. Set to a dash type character among "solid", "dot", "dash", "longdash", "dashdot", or "longdashdot", or a dash length list in px (eg "5px","10px","2px"). Can also be a positive numeric value (e.g 5, 10, 2). Default is "dash". See plotly help page on layouts for complete list and more details
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
X-axis label. Default is "Expected -log10(p)"
Y-axis label. Default is "Observed -log10(p)"
Title of the plot. Default is "Q-Q Plot"
An interactive Q-Q plot.
# NOT RUN {
library(manhattanly)
qqly(HapMap)
# highlight SNPs of interest
# 'signigicantSNP' is a character vector of SNPs included in this package
qqly(HapMap, snp = "SNP", highlight = significantSNP)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab