volcano_plot {fastTopics} | R Documentation |
Volcano Plots for Visualizing Results of Differential Expression Analysis
Description
Create a “volcano” plot to visualize the
results of a differential count analysis using a topic model. Here,
the volcano plot is a scatterplot in which the posterior mean
log-fold change (LFC), estimated by running the methods implemented
in de_analysis
, is plotted against the estimated
z-score. Variations on this volcano plot may also be created, for
example by showing f0 (the null-model estimates) instead of the
z-scores. Use volcano_plotly
to create an interactive
volcano plot.
Usage
volcano_plot(
de,
k,
labels,
y = c("z", "f0"),
do.label = volcano_plot_do_label_default,
ymin = 1e-06,
ymax = Inf,
max.overlaps = Inf,
plot.title = paste("topic", k),
ggplot_call = volcano_plot_ggplot_call
)
## S3 method for class 'topic_model_de_analysis'
plot(x, ...)
volcano_plotly(
de,
k,
file,
labels,
y = c("z", "f0"),
ymin = 1e-06,
ymax = Inf,
width = 500,
height = 500,
plot.title = paste("topic", k),
plot_ly_call = volcano_plot_ly_call
)
volcano_plot_do_label_default(lfc, y)
volcano_plot_ggplot_call(dat, y, plot.title, max.overlaps = Inf, font.size = 9)
volcano_plot_ly_call(dat, y, plot.title, width, height)
Arguments
de |
An object of class “topic_model_de_analysis”,
usually an output from |
k |
The topic, selected by number or name. |
labels |
Character vector specifying how the points in the
volcano plot are labeled. This should be a character vector with
one entry per LFC estimate (row of |
y |
A vector of the same length as |
do.label |
The function used to deetermine which LFC estimates
to label. Replace |
ymin |
Y-axis values less than |
ymax |
Y-axis values greater than |
max.overlaps |
Argument passed to
|
plot.title |
The title of the plot. |
ggplot_call |
The function used to create the plot. Replace
|
x |
An object of class “topic_model_de_analysis”,
usually an output from |
... |
Additional arguments passed to |
file |
Save the interactive volcano plot to this HTML
file using |
width |
Width of the plot in pixels. Passed as argument
“width” to |
height |
Height of the plot in pixels. Passed as argument
“height” to |
plot_ly_call |
The function used to create the plot. Replace
|
lfc |
A vector of log-fold change estimates. |
dat |
A data frame passed as input to
|
font.size |
Font size used in plot. |
Details
Interactive volcano plots can be created using the ‘plotly’ package. The “hover text” shows the label and detailed LFC statistics.
Value
A ggplot
object or a plotly
object.
See Also
Examples
# See help(de_analysis) for examples.