vsVolcano {vidger} | R Documentation |
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.
vsVolcano(x, y, data, d.factor = NULL, type = c("cuffdiff", "deseq", "edger"), padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE, legend = TRUE, grid = TRUE, highlight = NULL, data.return = FALSE, xaxis.text.size = 10, yaxis.text.size = 10, xaxis.title.size = 10, yaxis.title.size = 10, main.title.size = 15, legend.text.size = 9)
x |
treatment |
y |
treatment |
data |
output generated from calling the main routines of either
|
d.factor |
a specified factor; for use with |
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 (boundaries) to the x axis. Defaults to
|
lfc |
log fold change level for setting conditonals. If no user
input is added ( |
title |
display the main title of plot. Logical; defaults to
|
legend |
display legend of plot. Logical; defaults to |
grid |
display major and minor axis lines. Logical; defaults to
|
highlight |
character string of IDs that will be highlighted. Set to
|
data.return |
returns data output of plot Logical; defaults 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 |
An object created by ggplot
Brandon Monier, brandon.monier@sdstate.edu
# Cuffdiff example data("df.cuff") vsVolcano( x = "hESC", y = "iPS", data = df.cuff, d.factor = NULL, type = "cuffdiff", padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE, grid = TRUE, data.return = FALSE ) # DESeq2 example data("df.deseq") require(DESeq2) vsVolcano( x = "treated_paired.end", y = "untreated_paired.end", data = df.deseq, d.factor = "condition", type = "deseq", padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE, grid = TRUE, data.return = FALSE ) # edgeR example data("df.edger") require(edgeR) vsVolcano( x = "WM", y = "MM", data = df.edger, d.factor = NULL, type = "edger", padj = 0.1, x.lim = NULL, lfc = 2, title = FALSE, grid = TRUE, data.return = FALSE ) data("df.deseq") require(DESeq2) hl <- c( "FBgn0036248", "FBgn0026573", "FBgn0259742", "FBgn0038961", "FBgn0038928" ) vsVolcano( x = "treated_paired.end", y = "untreated_paired.end", data = df.deseq, d.factor = "condition", type = "deseq", padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE, grid = TRUE, data.return = FALSE, highlight = hl ) # Extract data frame from visualization data("df.cuff") tmp <- vsVolcano( x = "hESC", y = "iPS", data = df.cuff, d.factor = NULL, type = "cuffdiff", padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE, grid = TRUE, data.return = TRUE ) df_volcano <- tmp[[1]] ## or use tmp$data head(df_volcano) # Show plot from object (see prior example for more details) tmp[[2]] ## or use tmp$plot