Creates an interactive volcano plot with multiple annotation options
volcanoly(
x,
...,
col = c("#252525"),
point_size = 5,
effect_size_line = c(-1, 1),
effect_size_line_color = "grey",
effect_size_line_width = 0.5,
effect_size_line_type = "dash",
genomewideline = -log10(1e-05),
genomewideline_color = "grey",
genomewideline_width = 0.5,
genomewideline_type = "dash",
highlight = NULL,
highlight_color = "red",
xlab = NULL,
ylab = "-log10(p)",
title = "Volcano Plot"
)
Can be an object of class volcanor
produced by the
volcanor
function or a data.frame
which must contain
at least the following two columns:
a p-value, must be numeric
a measure of the strength of association, typically an odds ratio, regression coefficient or log fold change. Must be numeric
other parameters passed to volcanor
A character of length 1 indicating the color of the points. Only the first argument will be used if more than one color is supplied. Can be Hex Codes as well.
A numeric
indicating the size of the points on the
plot. Default is 5
Where to draw a "suggestive" line on the x-axis.
Default is -1 and +1
. Must be a vector of length 2. If a longer
vector is supplied, only the first two elements will be used. First element
must be smaller than second element. Set to FALSE
to disable.
color of "suggestive" line. Only used if
effect_size_line
is not set to FALSE
. Default is
"blue"
.
Width of effect_size_line
. Default is 1.
Sets the line type of the
effect_size_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
Where to draw a "genome-wide sigificant" line. Default
-log10(1e-5)
. Set to FALSE
to disable. If more than one
element is provided, only the first will be used
color of "genome-wide sigificant" line. Only used
if genomewideline
is not set to FALSE
. Default is
"red"
.
Width of genomewideline
. Default is 1.
Sets the line type of the genomewideline
.
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 all points that are both beyond genomewideline
and
effect_size_line
are highlighted. Set to FALSE
if you don't
want any points highlighted.
Color used to highlight points. Only used if
highlight
argument has been specified
X-axis label. Default is NULL
which means that the label
is automatically determined by the volcanor
function. Specify
here to overwrite the default.
Y-axis label. Default is "-log10(p)"
.
Title of the plot. Default is "Volcano Plot"
An interactive volcano plot.
# NOT RUN {
volcanorObj <- volcanor(HapMap,
p = "P",
effect_size = "EFFECTSIZE",
snp = "SNP",
gene = "GENE"
)
class(volcanorObj)
head(volcanorObj$data)
# }
Run the code above in your browser using DataLab