View source: R/limma_contrasts.R
limma_contrasts | R Documentation |
Apply limma's lmFit
, contrasts.fit
, & eBayes
to one or more contrasts, and return
a table. See examples in vignette.
limma_contrasts(
object,
grp = NULL,
contrast.v,
design = NULL,
weights = NA,
trend = FALSE,
ndups = NULL,
spacing = NULL,
block = NULL,
correlation = NULL,
adjust.method = "BH",
add.means = !is.null(grp),
treat.lfc = NULL,
moderated = TRUE,
check.names = TRUE,
cols = c("P.Value", "adj.P.Val", "logFC")
)
object |
Matrix-like data object containing log-ratios or log-expression values, with rows corresponding to features (e.g. genes) and columns to samples. Must have row names that are non-duplicated and non-empty. |
grp |
Vector of sample groups. These must be valid variable names in R and the same length as
|
contrast.v |
Named vector of contrasts, passed to |
design |
Design matrix of the experiment, with rows corresponding to samples and columns to coefficients to be estimated. |
weights |
Non-negative observation weights. Can be a numeric matrix of individual weights of same size as the
|
trend |
Logical; should an intensity-trend be allowed for the prior variance? Default is that the prior variance is constant. |
ndups |
Positive integer giving the number of times each distinct probe is measured in each sample. See Details. |
spacing |
Positive integer giving the spacing between duplicate occurrences of the same probe, with
|
block |
Vector specifying a blocking variable on the samples. Has length = |
correlation |
Inter-duplicate or inter-technical replicate correlation. Must be given if
|
adjust.method |
Method used to adjust the p-values for multiple testing. Options, in increasing conservatism,
include |
add.means |
Logical indicating if (unweighted) group means per row should be added to the output. |
treat.lfc |
Vector of logFC passed to |
moderated |
Logical; should |
check.names |
Logical; should |
cols |
Columns of |
If design
is NULL
and grp
is given, design will be calculated as
model.matrix(~0+grp)
. However, grp
isn't needed if design
is provided & add.means
is FALSE
.
The defaults of arguments ndups
and spacing
are set to NULL
,
which allows these arguments to be overridden by the elements object$printer$ndups
and
object$printer$spacing
, respectively, if these exist. Whereas, if an element does not exist,
the corresponding argument is treated as being its default in lmFit
,
i.e. ndups=1
or spacing=1
.
If either of these arguments are specified, they would override the
respective element of object$printer
, if the element existed.
When moderated
is FALSE, an error is generated if !is.null(treat.lfc)
or trend
is TRUE.
Cols CI.L
and CI.R
give the 95
Data frame.
McCarthy DJ & Smyth GK (2009). Testing significance relative to a fold-change threshold is a TREAT. Bioinformatics 25, 765-771.
lmFit
; eBayes
; limma_cor
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.