Description Usage Arguments Value See Also Examples
density_plot
function takes an object of class
fpkm_counts
or raw_counts
and returns density plots of all
samples facetted by the groups specified.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | density_plot(x, interactive = FALSE, title, groups, facet_cols = 1L,
log = FALSE, filename, height = 8L, width = 12L, ...)
## Default S3 method:
density_plot(x, interactive = FALSE, title, groups,
facet_cols = 1L, log = FALSE, filename, height = 8L, width = 12L, ...)
## S3 method for class 'fpkm_counts'
density_plot(x, interactive = FALSE, title, groups,
facet_cols = 1L, log = FALSE, filename, height = 8L, width = 12L, ...)
## S3 method for class 'raw_counts'
density_plot(x, interactive = FALSE, title, groups,
facet_cols = 1L, log = FALSE, filename, height = 8L, width = 12L, ...)
|
x |
An object of class |
interactive |
Default is |
title |
Plot title. |
groups |
Columns indicating those samples that needs to be selected together while facetting. |
facet_cols |
Number of columns to provide to |
log |
Should values be log-transformed? Default is |
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 |
A ggplot2
or plotly
object containing the
density plot of input fpkm_counts
or raw_counts
object.
rnaseq
, gather_counts
show_counts
limma_dge
edger_dge
construct_design
construct_contrasts
write_dge
as.dgelist
as.eset
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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)
# DE genes between treatA and control
density_plot(raw_counts, interactive=FALSE, groups="condition") # ggplot2
density_plot(raw_counts, interactive=FALSE, groups="condition", log=TRUE)
density_plot(raw_counts, interactive=FALSE,
groups="condition", title="Raw count density")
density_plot(raw_counts, interactive=TRUE,
groups="condition", log=TRUE) # ggplotly
## Not run:
# write to file and return plot obj
density_plot(raw_counts, filename="tmp.png")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.