getGeneSetsForPlot {esetVis} | R Documentation

## get gene sets for plot of eSet object.

### Description

get and format gene sets to be used as `geneSets` for the functions: `esetSpectralMap`, `esetLda`, or `esetPlotWrapper` Use the `getGeneSets` function to get the gene sets, combine all databases, and format the gene sets name if required.

### Usage

    getGeneSetsForPlot(entrezIdentifiers, species = "Human",
      geneSetSource = c("GOBP", "GOMF", "GOCC", "KEGG"),
      useDescription = TRUE, trace = TRUE)

### Arguments

`entrezIdentifiers` | string with Entrez Gene identifiers of the genes of interest
`species` | species to use, given to the `getGeneSets` function
`geneSetSource` | gene set source, either 'GOBP', 'GOMF', 'GOCC' or 'KEGG'. Multiple choices are available
`useDescription` | logical, if TRUE (by default) use the description to label the gene sets, otherwise use the original gene set identifiers Function 'substr' is used.
`trace` | logical, if TRUE (by default) a few extra information are printed during the process

### Value

list with gene sets, each element is a gene set and contains the ENTREZ IDs of the genes contained in this set. If `useDescription` is:

- FALSE: pathways are labelled with identifiers (Gene Ontology IDs for GOBP, GOMF and GOCC, KEGG IDs for KEGG)

- TRUE: pathways are labelled with gene sets descriptions

### Author(s)

Laure Cougnaud

### See Also

the function used internally: `getGeneSets`

### Examples

    # example dataset
    library(ALL)
    data(ALL)

    # get gene annotation from probe IDs
    library("hgu95av2.db")
    probeIDs <- featureNames(ALL)
    geneInfo <- select(hgu95av2.db, probeIDs,"ENTREZID", "PROBEID")

    # get pathway annotation for the genes contained in the ALL dataset (can take a few minutes)
    geneSets <- getGeneSetsForPlot(entrezIdentifiers = geneInfo$ENTREZID, species = "Human",
    	geneSetSource = 'GOBP',
    	useDescription = FALSE, trace = TRUE)
    head(geneSets) # returns a pathway list of genes

    # gene sets labelled with gene sets description
    geneSets <- getGeneSetsForPlot(entrezIdentifiers = geneInfo$ENTREZID, species = "Human",
    	geneSetSource = 'GOBP', useDescription = TRUE, trace = TRUE)
    head(geneSets) # returns a pathway list of genes

    # see also vignette for an example of the use of this function as input for the esetSpectralMap, esetLda or esetPlotWrapper functions

[Package esetVis version 1.12.0 Index]