# (1) expression set:
# simulated expression values of 100 genes
# in two sample groups of 6 samples each
eset <- make.example.data(what="eset")
eset <- de.ana(eset)
# (2) gene sets:
# draw 10 gene sets with 15-25 genes
gs <- make.example.data(what="gs", gnames=featureNames(eset))
# (3) make artificial enrichment analysis results:
# 2 ea methods with 5 significantly enriched gene sets each
ora.res <- make.example.data(what="ea.res", method="ora", eset=eset, gs=gs)
gsea.res <- make.example.data(what="ea.res", method="gsea", eset=eset, gs=gs)
# (4) combining the results
res.list <- list(ora.res, gsea.res)
comb.res <- comb.ea.results(res.list)
# (5) result visualization and exploration
gs.ranking(comb.res)
# user-defined ranking and combination functions
# (a) dummy ranking, give 1:nrow(res.tbl)
dummy.rank <- function(res.tbl) seq_len(nrow(res.tbl))
# (b) weighted average for combining ranks
wavg <- function(r) mean(c(1,2) * r)
comb.res <- comb.ea.results(res.list, rank.fun=dummy.rank, comb.fun=wavg)
Run the code above in your browser using DataLab