barplot {methylGSA} | R Documentation |
This function visualizes methylGSA analysis result by barplot.
barplot(res, xaxis = "Size", num = 5, colorby = "padj", title = "")
res |
A data frame which contains methylGSA analysis result. |
xaxis |
A string which specify the x-axis in the barplot. Either "Size" (number of genes in gene set) or "Count" (number of significant genes in gene set). Default is "Size". "Count" option is not available for methylglm and methylRRA(GSEA) result. |
num |
An integer. Number of gene sets to display on the barplot. Default is 5. |
colorby |
A string. Either "pvalue" or "padj". Default is "padj". |
title |
A string. Barplot title. Default is NULL. |
The implementation of the function is adapted from barplot function in enrichplot package.
ggplot object
Yu G (2018). enrichplot: Visualization of Functional Enrichment Result. R package version 1.0.2, https://github.com/GuangchuangYu/enrichplot.
res = data.frame(ID = c("04144", "04510", "04740", "04810", "05200"), Description = c("Endocytosis", "Focal adhesion", "Olfactory transduction", "Regulation of actin cytoskeleton", "Pathways in cancer"), Size = c(201, 200, 388, 213, 326), pvalue = c(0.481, 0.696, 1, 1, 1), padj = 1 ) barplot(res)