Learn R Programming

limma (version 3.22.7)

goana.MarrayLM: Gene Ontology Analysis of Differentially Expressed Genes

Description

Test for over-representation of gene ontology (GO) terms in the up and down differentially expressed genes from a linear model fit.

Usage

"goana"(de, coef = ncol(de), geneid = rownames(de), FDR = 0.05, species = "Hs", trend = FALSE, ...)

Arguments

de
an MArrayLM fit object.
coef
column number or column name specifying for which coefficient or contrast differential expression should be assessed.
geneid
Entrez Gene identifiers. Either a vector of length nrow(de) or the name of the column of de$genes containing the Entrez Gene IDs.
FDR
false discovery rate cutoff for differentially expressed genes. Numeric value between 0 and 1.
species
species identifier. Possible values are "Hs", "Mm", "Rn" or "Dm".
trend
adjust analysis for gene length or abundance? Can be logical, or a numeric vector of covariate values, or the name of the column of de$genes containing the covariate values. If TRUE, then de$Amean is used as the covariate.
...
any other arguments are passed to goana.default.

Value

A data frame with a row for each GO term and the following columns:
Term
GO term.
Ont
ontology that the GO term belongs to. Possible values are "BP", "CC" and "MF".
N
number of genes in the GO term.
Up
number of up-regulated differentially expressed genes.
Down
number of down-regulated differentially expressed genes.
P.Up
p-value for over-representation of GO term in up-regulated genes.
P.Down
p-value for over-representation of GO term in down-regulated genes.
The row names of the data frame give the GO term IDs.

Details

Performs Gene Ontology enrichment analyses for the up and down differentially expressed genes from a linear model analysis. The Entrez Gene ID must be supplied for each gene.

If trend=FALSE, the function computes one-sided hypergeometric tests equivalent to Fisher's exact test.

If trend=TRUE or a covariate is supplied, then a trend is fitted to the differential expression results and the method of Young et al (2010) is used to adjust for this trend. The adjusted test uses Wallenius' noncentral hypergeometric distribution.

References

Young, M. D., Wakefield, M. J., Smyth, G. K., Oshlack, A. (2010). Gene ontology analysis for RNA-seq: accounting for selection bias. Genome Biology 11, R14. http://genomebiology.com/2010/11/2/R14

See Also

goana.default, topGO

The goseq package implements a similar GO analysis. The goseq version will work with a variety of gene identifiers, not only Entrez Gene as here, and includes a database of gene length information for various species.

The gostats package also does GO analyses with some different options.

Examples

Run this code

## Not run: 
# 
# fit <- lmFit(y, design)
# fit <- eBayes(fit)
# 
# # Standard GO analysis
# go.fisher <- goana(fit)
# topGO(go.fisher, sort = "up")
# topGO(go.fisher, sort = "down")
# 
# # GO analysis adjusting for gene abundance
# go.abund <- goana(fit, geneid = "GeneID", trend = TRUE)
# topGO(go.abund, sort = "up")
# topGO(go.abund, sort = "down")
# 
# # GO analysis adjusting for gene length bias
# # (assuming that y$genes$Length contains gene lengths)
# go.len <- goana(fit, geneid = "GeneID", trend = "Length")
# topGO(go.len, sort = "up")
# topGO(go.len, sort = "down")
# ## End(Not run)

Run the code above in your browser using DataLab