View source: R/plot_marginalPlot.R
ggplot2_marginPlot | R Documentation |
ggplot2_marginPlot
function plots the percent change in number of DE
genes identified at each step-wise increase in replicate level.
ggplot2_marginPlot(deg = NULL, stat = "median", path = ".", save_plot = TRUE)
deg |
The list of DE genes generated by one of ERSSA::DE_*.R scripts. |
stat |
The statistic used for plotting. Options include 'mean', 'median'. Default='median'. |
path |
Path to which the plot will be saved. Default to current working directory. |
save_plot |
Boolean. Whether to save plot to drive. Default to TRUE. |
The percent change is calculated as (margin*100 lower replicate level). The results are visualized as bar plots. Either mean or median can be used for the calculation.
A list is returned containing:
gg_object the ggplot2 object, which can then be further customized.
marg_diff.dataframe the tidy table version of percent changes for plotting.
Zixuan Shao, Zixuanshao.zach@gmail.com
H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2009.
# load edgeR deg object generated by erssa_edger using example dataset
# example dataset containing 1000 genes, 4 replicates and 5 comb. per rep.
# level
data(deg.partial, package = "ERSSA")
gg_margin = ggplot2_marginPlot(deg.partial)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.