barplot: Barplot for methylGSA analysis result

Description Usage Arguments Details Value References Examples

View source: R/barplot.R

Description

This function visualizes methylGSA analysis result by barplot.

Usage

1
barplot(res, xaxis = "Size", num = 5, colorby = "padj", title = "")

Arguments

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.

Details

The implementation of the function is adapted from barplot function in enrichplot package.

Value

ggplot object

References

Yu G (2018). enrichplot: Visualization of Functional Enrichment Result. R package version 1.0.2, https://github.com/GuangchuangYu/enrichplot.

Examples

1
2
3
4
5
6
7
8
9
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)

methylGSA documentation built on Nov. 8, 2020, 8:29 p.m.