Description Usage Arguments Details Value See Also Examples
volcano_plot takes an object of class dge and
returns a volcano plot. If filename is provided, the plot is also
saved to the file.
1 2 3 4 5 6 7 8 9 10 | volcano_plot(x, interactive = FALSE, title, labels = 6L, filename,
height = 8L, width = 12L, ...)
## Default S3 method:
volcano_plot(x, interactive = FALSE, title, labels = 6L,
filename, height = 8L, width = 12L, ...)
## S3 method for class 'dge'
volcano_plot(x, interactive = FALSE, title, labels = 6L,
filename, height = 8L, width = 12L, ...)
|
x |
An object of class |
interactive |
Default is |
title |
Plot title. |
labels |
Integer vector of length-1 indicating the number of top genes that should be labeled. Default is 6. |
filename |
Default is to plot to screen. If a file name
is provided, the plot is saved to file and the plot object will be
returned. The type of graphic device is auto-detected from file extension
(using |
height |
Height of the plot, default is 8 inches. |
width |
Width of the plot, default is 12 inches. |
... |
Optional arguments to pass to |
Both limma_dge or edger_dge
methods return dge object which can be directly passed to
volcano_plot. It inherits from data.table.
A ggplot2 or plotly object containing the
volcano plot of input dge object.
rnaseq, gather_counts
show_counts limma_dge edger_dge
construct_design construct_contrasts
write_dge as.dgelist as.eset
density_plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | path = system.file("tests", package="ganalyse")
# ----- raw ----- #
raw_path = file.path(path, "raw", "annotation.txt")
raw_obj = rnaseq(raw_path, format="raw", experiment="sample")
raw_counts = gather_counts(raw_obj, by="gene-id", threshold=1L)
raw_design = construct_design(raw_counts, ~ 0 + condition)
raw_contrasts = construct_contrasts(
design = raw_design,
treatA.vs.control = conditiontreatA-conditioncontrol,
treatB.vs.control = conditiontreatB-conditioncontrol
)
# DE genes between treatA and control
ans = edger_dge(raw_counts, design=raw_design,
contrast=raw_contrasts[, "treatA.vs.control"])
volcano_plot(ans, interactive=FALSE) # ggplot2 plot
volcano_plot(ans, interactive=FALSE, title="A.vs.control")
volcano_plot(ans, interactive=TRUE, title="A.vs.control") # ggplotly plot
## Not run:
volcano_plot(ans, filename="tmp.png") # write to file and return plot obj
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.