limma_ftest_pairwise: Perform limma's moderated F-test for all pairwise comparions,...

View source: R/limma_ftest_pairwise.R

limma_ftest_pairwiseR Documentation

Perform limma's moderated F-test for all pairwise comparions, and return a table

Description

Make contrasts for all pairwise comparions, and pass them to limma_ftest_contrasts.

Usage

limma_ftest_pairwise(
  object,
  grp,
  add.means = TRUE,
  weights = NA,
  design = NULL,
  prefix = "",
  trend = FALSE,
  block = NULL,
  correlation = NULL
)

Arguments

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 ncol(object).

add.means

Logical indicating if (unweighted) group means per row should be added to the output.

weights

Non-negative observation weights. Can be a numeric matrix of individual weights of same size as the object, or a numeric vector of sample weights with length ncol(object), or a numeric vector of gene weights with length equal to nrow(object). Set to NULL to ignore object$weights. weights=NA (with length one) doesn't pass weights to limma.

design

Design matrix of the experiment, with rows corresponding to samples and columns to coefficients to be estimated.

prefix

Character string to add to beginning of column names. NULL does not add a prefix.

trend

Logical; should an intensity-trend be allowed for the prior variance? Default is that the prior variance is constant.

block

Vector specifying a blocking variable on the samples. Has length = ncol(object). Must be NULL if ndups > 1.

correlation

Inter-duplicate or inter-technical replicate correlation. Must be given if ndups>1 or !is.null(block).

Details

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.

Value

Data frame.

References

McCarthy DJ & Smyth GK (2009). Testing significance relative to a fold-change threshold is a TREAT. Bioinformatics 25, 765-771.


jdreyf/jdcbioinfo documentation built on April 15, 2024, 6:37 p.m.