Description Usage Arguments Details Value Author(s) Examples
This function allows you to extract necessary results-based data from a DESeq object class to create a four-way plot to compare log fold changes in various treatments using ggplot2 aesthetics.
1 2 3 4 5 6 | vsFourWay(x, y, control, data, d.factor = NULL, type = c("cuffdiff",
"deseq", "edger"), padj = 0.05, x.lim = NULL, y.lim = NULL,
lfc = NULL, legend = TRUE, title = 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 |
control |
|
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
|
y.lim |
set manual limits (boundaries) to the y axis. Defaults to
|
lfc |
log fold change level for setting conditonals. If no user input
is added ( |
legend |
display legend of plot. Logical; defaults to |
title |
display the main title 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 |
This function allows the user to extract various elements from a different analytical object class which in turn, creates a temporary data frame to plot the necessary ggplot aesthetics. In order for this function to work, RNA seq experiments must have multiple factors (i.e. two treatments and a control) and levels including treatments and controls. By having the recommended criteria, this function will extract the necessary data dependent on the analysis performed. Data points with "extreme" values that exceed the default viewing frame of the plot will change character classes (i.e. points of interest a substantially large log fold change).
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | # Cuffdiff example
data("df.cuff")
vsFourWay(
x = "hESC", y = "iPS", control = "Fibroblasts", data = df.cuff,
d.factor = NULL, type = "cuffdiff", padj = 0.05, x.lim = NULL,
y.lim = NULL, lfc = 2, title = TRUE, grid = TRUE,
data.return = FALSE
)
# DESeq2 example
data("df.deseq")
vsFourWay(
x = "treated_paired.end", y = "untreated_paired.end",
control = "untreated_single.read", data = df.deseq,
d.factor = "condition", type = "deseq", padj = 0.05,
x.lim = NULL, y.lim = NULL, lfc = 2, title = TRUE, grid = TRUE,
data.return = FALSE
)
# edgeR example
data("df.edger")
require(edgeR)
vsFourWay(
x = "WM", y = "WW", control = "MM", data = df.edger,
d.factor = NULL, type = "edger", padj = 0.05, x.lim = NULL,
y.lim = NULL, lfc = 2, title = TRUE, grid = TRUE,
data.return = FALSE
)
# Highlight IDs
data("df.edger")
require(edgeR)
hl <- c(
"ID_639",
"ID_518",
"ID_602",
"ID_449",
"ID_076"
)
vsFourWay(
x = "WM", y = "WW", control = "MM", data = df.edger,
d.factor = NULL, type = "edger", padj = 0.05, x.lim = NULL,
y.lim = NULL, lfc = 2, title = TRUE, grid = TRUE,
data.return = FALSE, highlight = hl
)
# Extract data frame from visualization
data("df.cuff")
tmp <- vsFourWay(
x = "WM", y = "WW", control = "MM", data = df.edger,
d.factor = NULL, type = "edger", padj = 0.05,
x.lim = NULL, y.lim = NULL, lfc = 2, title = TRUE,
grid = TRUE, data.return = TRUE
)
df_four <- tmp[[1]] ## or use tmp$data
head(df_four)
# 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.