dream_ftest_pairwise: Perform dream's moderated F-test for all pairwise...

View source: R/dream_ftest_pairwise.R

dream_ftest_pairwiseR Documentation

Perform dream's moderated F-test for all pairwise comparisons, and return a table

Description

Make contrasts for all pairwise comparisons, and pass them to dream_ftest_contrasts.

Usage

dream_ftest_pairwise(
  object,
  formula,
  pheno,
  grp,
  weights = NA,
  add.means = TRUE,
  moderated = TRUE,
  prefix = ""
)

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.

formula

specifies variables for the linear (mixed) model. Must only specify covariates, since the rows of exprObj are automatically used as a response. e.g.: ~ a + b + (1|c) Formulas with only fixed effects also work, and lmFit() followed by contrasts.fit() are run.

pheno

data.frame with columns corresponding to formula

grp

Vector of sample groups. These must be valid variable names in R and the same length as ncol(object).

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.

add.means

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

moderated

Logical; should variancePartition::eBayes be used?

prefix

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

Value

Data frame.


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