A convenience wrapper for differential analysis with LIMMA. Performs moderated t-tests, F-tests, or linear regression.
Usage
limma_full(
object,
model.str,
coef.str,
contrasts,
trend = TRUE,
robust = TRUE,
var.group = character(0),
block = NULL,
plot = FALSE,
adjust.method = "BH",
adjust.globally = TRUE,
...
)
Arguments
- object
Object of class
ExpressionSet
. Theexprs
slot can be either a matrix of log\(_2\) relative abundances or counts. If the latter, the limma--edgeR pipeline (https://doi.org/10.12688/f1000research.9005.3) will automatically be used.- model.str
character; formulation of the model (e.g.
"~ a + b"
). Ifcontrasts
are provided, this should be a no-intercept model (it should include 0 or -1 as terms). Seelm
for more details.- coef.str
character; coefficient of interest. One of
colnames(pData(object))
.- contrasts
character; optional contrasts of the form
"a-b"
to test.- trend
logical; should an intensity-dependent trend be allowed for the prior variance? If
FALSE
, then the prior variance is constant. Alternatively,trend
can be a row-wise numeric vector, which will be used as the covariate for the prior variance. SeeeBayes
for more details.- robust
logical; should the estimation of
df.prior
andvar.prior
be robustified against outlier sample variances? SeeeBayes
for more details.- var.group
character; the column in
pData(object)
indicating groups that will have different relative quality weights. The default (character(0)
) will weight each sample equally (all samples given a weight of 1). Weights affect the logFC and P.Value columns of the results.- block
NULL
or character; name of a column inpData(object)
specifying a blocking variable. Passed toduplicateCorrelation
. Section 9.7 "Multi-level Experiments" of the LIMMA User's Guide (seelimmaUsersGuide
) explains when to useduplicateCorrelation
. Currently ignored ifexprs(object)
is a matrix of counts.- plot
logical; whether to generate diagnostic plots. If
TRUE
, generates a barplot of weights applied to each sample and a plot of the mean-variance trend usingplotSA
.- adjust.method
method for p-value adjustment. Default is
"BH"
(Benjamini-Hochberg), which will control the false discovery rate (FDR). Seep.adjust
for details.- adjust.globally
logical; should p-values from all contrasts be adjusted together using
adjust.method
? Set toFALSE
if the contrasts being tested are not closely related. See Section 13.3 "Multiple Testing Across Contrasts" of the LIMMA User's Guide (limmaUsersGuide
) for more information.- ...
additional arguments passed to
plotSA
.
Value
data.frame
. Output of topTable
with
additional columns feature
, contrast
, and column(s) for the
standard error (SE) of the logFC. All columns from fData
are also
included.
Details
An MDS plot (plotMDS
) is used to determine the
appropriate value of var.group
. If samples within phenotype groups
tend to cluster well and have similar dispersions, the default
var.group = character(0)
is recommended. If samples within phenotype
groups tend to cluster well, but different groups are more or less
dispersed, it may be beneficial to set var.group
to the name of the
phenotype column. If one or more samples tend to cluster poorly with
samples of the same phenotype, it may be beneficial to weight by sample.
That is, set var.group
to the name of the column in
pData(object)
that uniquely identifies each sample. If variation
between samples or groups of samples is biological rather than technical,
weighting is not recommended.
The plot of the mean-variance trend helps determine whether to fit a trend
line to the prior variance (default is trend = TRUE
). It also helps
determine if the prior variance should be robustified against outlier
sample variances (robust = TRUE
). See eBayes
for more details.
References
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, Article3. https://doi.org/10.2202/1544-6115.1027
Smyth, G. K., Michaud, J., and Scott, H. (2005). The use of within-array replicate spots for assessing differential expression in microarray experiments. Bioinformatics 21(9), 2067--2075. http://bioinformatics.oxfordjournals.org/content/21/9/2067 Preprint with corrections: http://www.statsci.org/smyth/pubs/dupcor.pdf
Liu, R., Holik, A. Z., Su, S., Jansz, N., Chen, K., Leong, H. S., Blewitt, M. E., Asselin-Labat, M. L., Smyth, G. K., & Ritchie, M. E. (2015). Why weight? Modelling sample and observational level variability improves power in RNA-seq analyses. Nucleic acids research, 43(15), e97. https://doi.org/10.1093/nar/gkv412
Law, C. W., Alhamdoosh, M., Su, S., Dong, X., Tian, L., Smyth, G. K., & Ritchie, M. E. (2016). RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR. F1000Research, 5, ISCB Comm J-1408. https://doi.org/10.12688/f1000research.9005.3
Phipson, B., Lee, S., Majewski, I. J., Alexander, W. S., & Smyth, G. K. (2016). ROBUST HYPERPARAMETER ESTIMATION PROTECTS AGAINST HYPERVARIABLE GENES AND IMPROVES POWER TO DETECT DIFFERENTIAL EXPRESSION. The annals of applied statistics, 10(2), 946--963. https://doi.org/10.1214/16-AOAS920
See also
When to use
duplicateCorrelation
PennState STAT 555 - Statistical Analysis of Genomics Data
How to interpret a p-value histogram
Breheny, P., Stromberg, A., & Lambert, J. (2018). p-Value Histograms: Inference and Diagnostics. High-throughput, 7(3), 23. https://doi.org/10.3390/ht7030023