## Example 1 - using gene sets from the Molecular Signatures Database (MSigDB collections)
## Download .gmt file 'c2.all.v5.0.symbols.gmt' (all curated gene sets, gene symbols)
## from the Broad, http://www.broad.mit.edu/gsea/downloads.jsp#msigdb, then
geneSets <- getGmt("/path/to/c2.all.v5.0.symbols.gmt")
## load "eSetObject" containing simulated time-course data
data(TCsimData)
## check for differentially expressed genes
diffExprs <- splineDiffExprs(eSetObject = TCsimData, df = 3, cutoff.adj.pVal = 0.01, reference = "T1")
## use differentially expressed genes for pathway enrichment analysis
enrichPath <- pathEnrich(geneList = rownames(diffExprs), geneSets = geneSets, universe = 6536)
## Example 2 - using gene sets from the Reactome Pathway Database
## Download and unzip .gmt.zip file 'ReactomePathways.gmt.zip'
## ("Reactome Pathways Gene Set" under "Specialized data formats") from the Reactome website
## http://www.reactome.org/pages/download-data/, then
geneSets <- getGmt("/path/to/ReactomePathways.gmt")
data(TCsimData)
diffExprs <- splineDiffExprs(eSetObject = TCsimData, df = 3, cutoff.adj.pVal = 0.01, reference = "T1")
enrichPath <- pathEnrich(geneList = rownames(diffExprs), geneSets = geneSets, universe = 6536)
## Small example with gene sets consist of KEGG pathways only
geneSets <- getGmt(system.file("extdata", "c2.cp.kegg.v5.0.symbols.gmt", package="splineTimeR"))
data(TCsimData)
diffExprs <- splineDiffExprs(eSetObject = TCsimData, df = 3, cutoff.adj.pVal = 0.01, reference = "T1")
enrichPath <- pathEnrich(geneList = rownames(diffExprs), geneSets = geneSets, universe = 6536)
Run the code above in your browser using DataLab