# currently supported methods
nbea.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) gene regulatory network
grn <- make.example.data(what="grn", nodes=featureNames(eset))
# (5) performing the enrichment analysis
ea.res <- nbea(method="ggea", eset=eset, gs=gs, grn=grn)
# (6) result visualization and exploration
gs.ranking(ea.res, signif.only=FALSE)
# using your own tailored function as enrichment method
dummy.nbea <- function(eset, gs, grn, alpha, perm)
{
sig.ps <- sample(seq(0,0.05, length=1000),5)
insig.ps <- sample(seq(0.1,1, length=1000), length(gs)-5)
ps <- sample(c(sig.ps, insig.ps), length(gs))
score <- sample(1:100, length(gs), replace=TRUE)
res.tbl <- cbind(score, ps)
colnames(res.tbl) <- c("SCORE", "P.VALUE")
rownames(res.tbl) <- names(gs)
return(res.tbl[order(ps),])
}
ea.res2 <- nbea(method=dummy.nbea, eset=eset, gs=gs, grn=grn)
gs.ranking(ea.res2)
Run the code above in your browser using DataLab