genediff: Gene-by-gene and posterior p-value calculation function.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Computes two sets of p-values per gene or probe via gene-by-gene ANOVA, using both the gene-specific MSE and the posterior MSE for each term in the ANOVA. P-values are not adjusted for multiple testing.
Assumes a fixed effects model and that the correct denominator for all comparisons is the MSE.

Usage

1
2
genediff(eS, model = NULL, method = c("MLE", "MOM", "MOMlog"), 
verbose = TRUE)

Arguments

eS

An ExpressionSet object. Any transformation and normalization of exprs(eS) should be conducted prior to use in genediff.

model

Model used for comparison; see details and LMGene.

method

Method by which posterior p-values are calculated. Default "MLE".

verbose

If TRUE, the prior degrees of freedom and mean reciprocal precision are printed. See details.

Details

The argument eS must be an ExpressionSet object from the Biobase package. If you have data in a matrix and information about experimental design factors, then you can use neweS to convert the data into an ExpressionSet object. Please see neweS for more detail.

The model argument is an optional character string, constructed like the right-hand side of a formula for lm. It specifies which of the variables in the ExpressionSet will be used in the model and whether interaction terms will be included. If model=NULL, it uses all variables from the ExpressionSet without interactions. Be careful of using interaction terms with factors; this often leads to overfitting, which will yield an error.

The method argument specifies how the adjusted MSE and degrees of freedom should be calculated for use in computation of the posterior p-values:

"MLE"

Default. Calculate adjusted MSE and degrees of freedom by maximum likelihood estimation, as described in Wright and Simon (2003).

"MOM"

Calculate adjusted MSE and degrees of freedom by method of moments, as described in Rocke (2003).

"MOMlog"

Calculate adjusted MSE and degrees of freedom by method of moments on log scale, as described in Smyth (2004). Uses functions fitFdist and trigammainverse from the package limma. Note that the method of Smyth (2004) is used here to calculate the posterior MSE, but not to directly calculate the posterior p-values.

All three methods assume that the gene-specific MSE's follow a gamma distribution with mean tau. (NB: Notation and parameterization vary somewhat between each of the source papers.) The mean of the gamma distribution, tau, is modeled with an inverse gamma prior with hyperparameters alpha and beta. Empirical Bayes methods are used to estimate the prior hyperparameters, either by maximum likelihood, method of moments, or method of moments on the log scale. The "posterior MSE" is the posterior mean of the variances given the observed gene-specific MSE's.

If verbose = TRUE, the function prints the estimated prior degrees of freedom, which equals twice the prior shape parameter alpha, and the estimated prior mean reciprocal precision, or 1/(alpha*beta).

All p-values are calculated from fixed-effects ANOVA F statistics, using either the gene-specific MSE or the posterior MSE as the denominator.

Value

A list with components:

Gene.Specific

A matrix of p-values calculated using the gene-specific MSE, with one row for each gene/probe and one column for each factor

Posterior

A matrix of p-values calculated using the posterior MSE, with one row for each gene/probe and one column for each factor

Author(s)

David Rocke, Geun-Cheol Lee, and Blythe Durbin-Johnson

References

Rocke, D.M. (2003) Heterogeneity of variance in gene expression microarray data. http://dmrocke.ucdavis.edu/papers/empbayes2.pdf

Smyth, G.K (2004) Linear models and empirical Bayes methods for assessing differential expression in microarray experiments. Statistical Applications in Genetics and Molecular Biology 3, Article 3. http://www.bepress.com/sagmb/vol3/iss1/art3/

Wright, G.W. and Simon, R.M. (2003) A random variance model for detection of differential gene expression in small microarray experiments. Bioinformatics 19, 2448–2455.

http://dmrocke.ucdavis.edu

See Also

LMGene, rowaov, neweS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(Biobase)
library(LMGene)

#data
data(sample.mat)
data(vlist)

raw.eS <- neweS(sample.mat, vlist)

# glog transform data
trans.eS <- transeS(raw.eS, lambda = 727, alpha = 56)

# calculate p-values
pvlist <- genediff(trans.eS)
pvlist$Posterior[1:5,]

LMGene documentation built on April 28, 2020, 8:01 p.m.