runGSEA {RCAS} | R Documentation

## runGSEA

### Description

This function is used to facilitate gene set enrichment analysis (GSEA) for a given set of genes

### Usage

    runGSEA(geneSetList, species = "human", backgroundGenes, targetedGenes)

### Arguments

`geneSetList` | A named list of vectors where each vector consists of a set of Entrez gene ids (for instance, returned by `parseMsigdb` function)
`species` | A character string denoting the species under analysis. Options are 'human', 'mouse', 'fly' and 'worm'.
`backgroundGenes` | A vector of Ensembl gene ids that serve as background set of genes for GO term enrichment. In the context of RCAS, this should be the whole set of genes found in an input GTF file.
`targetedGenes` | A vector of Ensembl gene ids that serve as the set for which GSEA should be carried out. In the context of RCAS, this should be the set of genes that overlap the query regions

### Value

A data.frame object containing enriched gene sets and associated statistics

### Examples

    #load test data
    data(geneSets)
    data(gff)
    data(queryRegions)
    #get all genes from the gff data
    backgroundGenes <- unique(gff$gene_id)
    #get genes that overlap query regions
    overlaps <- queryGff(queryRegions, gff)
    targetedGenes <- unique(overlaps$gene_id)
    resultsGSEA <- runGSEA(geneSetList = geneSets,
              species = 'human',
              backgroundGenes = backgroundGenes,
              targetedGenes = targetedGenes)

[Package RCAS version 1.8.0 Index]