runVoom: Function runVoom (voom then lmFit)

Description Usage Arguments Details Value Author(s)

View source: R/runVoom.R

Description

In the recommended workflow this runs voomWithQualityWeights followed by lmfit and optionally eBayes. You should enable eBayes if the contrasts of interest are already represented in the model. If you intend to use contrasts.fit downstream, you should run eBayes after that step instead. In other words, run eBayes last.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
runVoom(
  dgeObj,
  designMatrixName,
  dupcorBlock,
  runDupCorTwice = TRUE,
  qualityWeights = TRUE,
  var.design,
  mvPlot = TRUE,
  runEBayes = TRUE,
  robust = TRUE,
  proportion = 0.01
)

Arguments

dgeObj

A DGEobj containing a DGEList (e.g. from runEdgeRNorm) (required)

designMatrixName

Name of a design matrix within dgeObj (required)

dupcorBlock

Supply a block argument to trigger duplicateCorrelation (optional). Should be a vector the same length as ncol with values to indicate common group membership for duplicateCorrelation.

runDupCorTwice

Default = TRUE. Gordon Smyth recommends running duplicateCorrelation twice. Set this to false to run duplicateCorrelation just once.

qualityWeights

Runs VoomWithQualityWeights if set to TRUE (default=TRUE). This should normally be set to TRUE.

var.design

Provide a design matrix (from model.matrix) to identify replicate groups (e.g. "~ ReplicateGroup") for quality weight determination. Causes quality weights to be determined on a group basis. If omitted VoomWithQualityWeights treats each sample individually.

mvPlot

Enables the voom mean-variance plot (Default = TRUE)

runEBayes

Runs eBayes after lmFit; default = TRUE

robust

Used by eBayes (Default = TRUE)

proportion

Proportion of genes expected to be differentially expressed (used by eBayes) (Default = 0.01) Modify the prior accordingly if your 1st pass analysis shows a significantly higher or lower proportion of genes regulated than the default.

Details

Input is minimally a DGEobj containing a DGEList (typically TMM-normalized), and a formula (text representation). Other arguments can invoke duplicateCorrelation and modify use of quality weights.

Returns a DGEobj class object containing the designMatrix, VoomElist (voom output) and Fit object (lmfit output). Appends data items to the input DGEobj.

Quality weights should be left enabled unless you have a good reason to turn it off. If all samples are equal quality, the weights will all approach 1.0 with no consequence on the results. More typically, some samples are better than others and using quality weights improves the overall result.

Use var.design when you notice that quality weights are correlated with some factor in the experiment. This will cause the quality weights to be calculated as a group instead of individually.

Use duplicate correlattion when you have subjects that have been sampled more than once (e.g. before and after some treatment). This calculates a within subject correlation and includes this in the model.

Value

A DGEobj now containing designMatrix, Elist and fit object

Author(s)

John Thompson, john.thompson@bms.com


jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.