# currently supported methods
sbea.methods()
# (1) expression data:
# 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 2 artificially enriched sets:
sig.genes <- featureNames(eset)[fData(eset)$ADJ.PVAL < 0.1]
gs[[1]] <- sample(sig.genes, length(gs[[1]]))
gs[[2]] <- sample(sig.genes, length(gs[[2]]))
# (4) performing the enrichment analysis
ea.res <- sbea(method="ora", eset=eset, gs=gs, perm=0)
# (5) result visualization and exploration
gs.ranking(ea.res)
# using your own tailored function as enrichment method
dummy.sbea <- function(eset, gs, alpha, perm)
{
sig.ps <- sample(seq(0, 0.05, length=1000), 5)
nsig.ps <- sample(seq(0.1, 1, length=1000), length(gs)-5)
ps <- sample(c(sig.ps, nsig.ps), length(gs))
names(ps) <- names(gs)
return(ps)
}
ea.res2 <- sbea(method=dummy.sbea, eset=eset, gs=gs)
gs.ranking(ea.res2)
Run the code above in your browser using DataLab