runGOAnalysis: Run basic GO analysis

Description Usage Arguments Value Author(s) Examples

Description

This function wraps the topGO-package an provides a streamlined appraoch to GO analysis. Sensible defaults are included, though may not be sufficient for all uses.

Usage

1
2
3
4
5
6
7
8
9
runGOAnalysis(sigGenes,
              expGenes,
              goAnno,
              pValThresh = 1,
              plotGO = FALSE,
              ontology = "BP",
              algorithm = "weight",
              statistic = "fisher",
              description = NULL)

Arguments

sigGenes

A character vector with the names of significant genes.

expGenes

A character vector with the names of all reference genes, for example, those expressed in the tissu of interest.

goAnno

A (named) list of of character vectors with GO identifiers for each gene, such as returned by readMappings

pValThresh

Numeric, what p-value (not corrected, see value below) threshold should be used to determine what should be returned. Defaults to 1 to return all GO terms analyzed to allow the user to perform multiple-testing corrections as desired.

plotGO

Logical - Should a plot be generated? If TRUE, plots to the currently active device.

ontology

Which ontology should be analyzed by runTest? Can be any of "BP", "MF", or "CC", for Biological Process, Molecular Function, or Cellular Component, respectively.

algorithm

Which algorithm should be used by runTest? Available values can be found with whichAlgorithms; defaults to "weight".

statistic

Which statistic should be used by runTest? Available values can be found with whichTests; defaults to "fisher".

description

A string to use in describing the go data set. Not currently used because the GOData object is not returned.

Value

Returns a data.frame with a row for each significant GO term. Note that it returns p-values, rather than adjusted p-values. The authors of topGO appear to feel strongly about this, so I have deferred to their choice. I do agree with them that the GO graph is inherently non-independent making most methods for correction overly-conservative. In addition, the default method ("weight") has a built in correction.

Author(s)

Mark Peterson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Only run if topGO is available
if(require(topGO)){

## Load the sample data from topGO
data(GOdata)

## Recreate the GO annotation
## NB: you will likely do this with readMappings()
goAnno <- inverseList(genesInTerm(GOdata,usedGO(GOdata)))

testOut <- runGOAnalysis(sigGenes(GOdata),
                         allGenes(GOdata),
                         goAnno,
                         algorithm = "classic",
                         pValThresh = 0.05)
                         
head(testOut)

}

rnaseqWrapper documentation built on May 2, 2019, 5:58 a.m.