Skip to contents

Order the genes according to each of the coefficient found in a limma object and run an enrichment test on the ordered list.

Usage

tmodLimmaTest(
  f,
  genes,
  sort.by = "msd",
  tmodFunc = tmodCERNOtest,
  coef = NULL,
  ...
)

Arguments

f

result of linear model fit produced by limma functions lmFit and eBayes

genes

Either the name of the column in f$genes which contains the gene symbols corresponding to the gene set collection used, or a character vector with gene symbols

sort.by

How the gene names should be ordered: "msd" (default), "pval" or "lfc"

tmodFunc

The function to run the enrichment tests. Either tmodCERNOtest or tmodUtest

coef

If not NULL, only run tmod on these coefficients

...

Further parameters passed to the tmod test function

Value

A list with length equal to the number of coeffients. Each element is the value returned by tmod test function. The list can be directly passed to the functions tmodSummary and tmodPanelPlot.

Details

For each coefficient in the fit returned by the eBayes / lmFit functions from the limma package, tmodLimmaTest will order the genes run an enrichment test and return the results.

The ordering of the genes according to a certain metric is the fundament for gene enrichment analysis. tmodLimmaTest allows three orderings: p-values, "MSD" and log fold changes. The default MSD ("minimal significant difference") is the lower boundary of the 95 confidence interval for positive log fold changes, and 0 minus the upper boundary of the 95 better than ordering by p-value or by log fold change. See discussion in the package vignette.

See also

tmodCERNOtest, tmodUtest, tmodPlotPanel, tmodSummary

Examples

if (FALSE) {
data(Egambia)
design <- cbind(Intercept=rep(1, 30), TB=rep(c(0,1), each= 15))
if(require(limma)) {
  fit <- eBayes( lmFit(Egambia[,-c(1:3)], design))
  ret <- tmodLimmaTest(fit, genes=Egambia$GENE_SYMBOL)
  tmodSummary(ret)
  tmodPanelPlot(ret)
}
}