Learn R Programming

EGSEA (version 1.0.3)

topSets: Table of Top Gene Sets from an EGSEA Analysis

Description

Extract a table of the top-ranked gene sets from an EGSEA analysis.

Usage

topSets(gsa, contrast = 1, gs.label = 1, sort.by = NULL, number = 10, names.only = TRUE)

Arguments

gsa
list, the analysis result object from egsea, egsea.cnt or egsea.ora.
contrast
contrast column number or column name specifying which contrast is of interest. if contrast = 0 or "comparison" and the number of contrasts greater than 1, the comparative gene sets are retruned.
gs.label
the number or label of the gene set collection of interest.
sort.by
character, determines how to order the analysis results in the stats table. The accepted values depend on the function used to generate the EGSEA results.
number
integer, maximum number of gene sets to list
names.only
logical, whether to display the EGSEA statistics or not.

Value

A dataframe of top gene sets with the calculated statistics for each if names.only = FALSE.

Examples

Run this code
library(EGSEAdata)
data(il13.data)
v = il13.data$voom
contrasts = il13.data$contra
gs.annots = buildIdxEZID(entrezIDs=rownames(v$E), species="human", 
msigdb.gsets="none", 
         kegg.updated=FALSE, kegg.exclude = c("Metabolism"))
gsa = egsea(voom.results=v, contrasts=contrasts,  gs.annots=gs.annots, 
         symbolsMap=v$genes, 
baseGSEAs=egsea.base()[-c(2,5,6,9)], display.top = 5,
          sort.by="avg.rank", egsea.dir="./il13-egsea-report", 
         num.threads = 2, report=FALSE)
topSets(gsa, contrast=1, gs.label="kegg", number = 10)
topSets(gsa, contrast=1, gs.label=1, sort.by="ora", number = 10, 
names.only=FALSE)
topSets(gsa, contrast=0, gs.label="kegg", number = 10)

Run the code above in your browser using DataLab