genediff(eS, model = NULL, method = c("MLE", "MOM", "MOMlog"),
verbose = TRUE)ExpressionSet object. Any transformation and normalization of exprs(eS) should be conducted prior to use in genediff.LMGene."MLE".TRUE, the prior degrees of freedom and mean reciprocal precision are printed. See details.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:
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.
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.
LMGene, rowaov, neweSlibrary(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,]
Run the code above in your browser using DataLab