###require limma to run the example
require(limma)
###load integrated gene-to-phenotype scores
data(intScores)
###load separate gene-to-phenotype scores
data(sepScores)
###load list of functional gene sets
data(fgsList)
###run GSE analysis in batch with default parameters
gseABS.int <- runBatchGSE(dataList=intScores, fgsList=fgsList)
###run GSE analysis in batch with alternative parameters
gseABS.sep <- runBatchGSE(dataList=sepScores, fgsList=fgsList, absolute=FALSE, type="t", alternative="up")
###run GSE analysis in batch passing an enrichment function
gseUP.int.2 <- runBatchGSE(dataList=intScores, fgsList=fgsList,
absolute=FALSE, gseFunc=wilcoxGST, alternative="up")
###define and use a new enrichment function
gseFunc <- function (selected, statistics, threshold) {
diffExpGenes <- statistics > threshold
tab <- table(diffExpGenes, selected)
pVal <- fisher.test(tab)[["p.value"]]
}
gseUP.sep.2 <- runBatchGSE(dataList=sepScores, fgsList=fgsList,
absolute=FALSE, gseFunc=gseFunc, threshold=7.5)
Run the code above in your browser using DataLab