xGSEAbarplotR Documentation

Function to visualise GSEA results using a barplot

Description

xGSEAbarplot is supposed to visualise GSEA results using a barplot. It returns an object of class "ggplot".

Usage

xGSEAbarplot(eGSEA, top_num = 10, displayBy = c("nes", "adjp", "fdr",
"pvalue"), FDR.cutoff = 0.05, bar.label = TRUE, bar.label.size = 3,
wrap.width = NULL, signature = TRUE)

Arguments

eGSEA

an object of class "eGSEA"

top_num

the number of the top terms (sorted according to FDR or adjusted p-values). If it is 'auto', only the significant terms (see below FDR.cutoff) will be displayed

displayBy

which statistics will be used for displaying. It can be "nes" for normalised enrichment score (by default), "adjp" or "fdr" for adjusted p value (or FDR), "pvalue" for p value

FDR.cutoff

FDR cutoff used to declare the significant terms. By default, it is set to 0.05. This option only works when setting top_num (see above) is 'auto'

bar.label

logical to indicate whether to label each bar with FDR. By default, it sets to true for bar labelling

bar.label.size

an integer specifying the bar labelling text size. By default, it sets to 3

wrap.width

a positive integer specifying wrap width of name

signature

logical to indicate whether the signature is assigned to the plot caption. By default, it sets TRUE showing which function is used to draw this graph

Value

an object of class "ggplot"

Note

none

See Also

xPierGSEA

Examples

## Not run: 
# Load the library
library(Pi)

## End(Not run)
RData.location <- "http://galahad.well.ox.ac.uk/bigdata_dev"
## Not run: 
bp <- xGSEAbarplot(eGSEA, top_num="auto", displayBy="nes")
#pdf(file="GSEA_barplot.pdf", height=6, width=12, compress=TRUE)
print(bp)
#dev.off()

## End(Not run)