Description Usage Arguments Value Author(s) Examples
View source: R/vsVolcanoMatrix.R
This function allows you to extract necessary results-based data from
either a DESeq2
object, edgeR
object, or cuffdiff
data
frame to create a volcano plot (i.e. a scatter plot) of the negative
log of the p-value versus the log of the fold change
while implementing ggplot2 aesthetics for all possible combinations of
treatments.
1 2 3 4 5 6 | vsVolcanoMatrix(data, d.factor = NULL, type = c("cuffdiff", "deseq",
"edger"), padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE,
legend = TRUE, grid = TRUE, counts = TRUE, data.return = FALSE,
xaxis.text.size = 9, yaxis.text.size = 9, xaxis.title.size = 10,
yaxis.title.size = 10, main.title.size = 15, legend.text.size = 9,
facet.title.size = 10)
|
data |
a cuffdiff, DESeq2, or edgeR object. |
d.factor |
a specified factor; for use with DESeq2 objects only.
Defaults to |
type |
an analysis classifier to tell the function how to process the
data. Must be either |
padj |
a user defined adjusted p-value cutoff point.
Defaults to |
x.lim |
set manual limits to the x axis. Defaults to |
lfc |
log fold change level for setting conditonals. If no user
input is added ( |
title |
show title of plot. Defaults to |
legend |
shows legend of plot. Defaults to |
grid |
show major and minor axis lines. Defaults to |
counts |
displays the number of differentially expressed genes for
each treatment comparison. Defaults to |
data.return |
returns data output of plot if set to |
xaxis.text.size |
change the font size of the |
yaxis.text.size |
change the font size of the |
xaxis.title.size |
change the font size of the |
yaxis.title.size |
change the font size of the |
main.title.size |
change the font size of the plot title text.
Defaults to |
legend.text.size |
change the font size of the legend body text.
Defaults to |
facet.title.size |
change the font size of the facet wrap title text.
Defaults to |
An object created by ggplot
Brandon Monier, brandon.monier@sdstate.edu
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 31 32 33 34 35 36 37 38 39 | # Cuffdiff example
data("df.cuff")
vsVolcanoMatrix(
data = df.cuff, d.factor = NULL, type = "cuffdiff",
padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE,
grid = TRUE, counts = TRUE, data.return = FALSE
)
# DESeq2 example
data("df.deseq")
require(DESeq2)
vsVolcanoMatrix(
data = df.deseq, d.factor = "condition", type = "deseq",
padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE,
grid = TRUE, counts = TRUE, data.return = FALSE
)
# edgeR example
data("df.edger")
require(edgeR)
vsVolcanoMatrix(
data = df.edger, d.factor = NULL, type = "edger",
padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE,
grid = TRUE, counts = TRUE, data.return = FALSE
)
# Extract data frame from visualization
data("df.cuff")
tmp <- vsVolcanoMatrix(
data = df.cuff, d.factor = NULL,
type = "cuffdiff", padj = 0.05, x.lim = NULL,
lfc = 2, title = TRUE, grid = TRUE,
counts = TRUE, data.return = TRUE
)
df_vmat <- tmp[[1]]
head(df_vmat)
# Show plot from object (see prior example for more details)
tmp[[2]] ## or use tmp$plot
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.