dream_cor: Apply variancePartition's dream to one or more contrasts,...

View source: R/dream_cor.R

dream_corR Documentation

Apply variancePartition's dream to one or more contrasts, perform moderated t-test, and return a table using limma's topTable

Description

Apply variancePartition's dream, to one or more contrasts, perform moderated t-test, and return a table using limma's topTable.

Usage

dream_cor(
  object,
  formula,
  pheno,
  weights = NA,
  coef = "",
  moderated = TRUE,
  cols = c("P.Value", "adj.P.Val", "logFC"),
  ncores = 1
)

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

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.

coef

column name of the mixed model

moderated

Logical; should variancePartition::eBayes be used?

cols

Columns of topTable output to include. Possibilities include "logFC", "AveExpr", "z", "t", "P.Value", "adj.P.Val", "B". Some of these column names are then changed here. If logFC is specified, FC will automatically also be given.

ncores

number of cores

Value

Data frame.


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