runContrasts: Function runContrasts

Description Usage Arguments Details Value Author(s) Examples

View source: R/runContrasts.R

Description

Take a DGEObj and a named list of contrasts to build. The DGEobj must contain a limma Fit object and associated DesignMatrix. Returns the DGEobj with contrast fit(s), contrast matrix and topTable/topTreat dataframes added.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
runContrasts(
  dgeObj,
  designMatrixName,
  contrastList,
  contrastSetName = fitName,
  runTopTable = TRUE,
  runTopTreat = FALSE,
  FoldChangeThreshold = 1.5,
  PvalueThreshold = 0.01,
  FDRthreshold = 0.1,
  runEBayes = TRUE,
  robust = TRUE,
  proportion = 0.01,
  Qvalue = FALSE,
  IHW = FALSE,
  verbose = FALSE
)

Arguments

dgeObj

A DGEobj object containing a Fit object and design matrix (required)

designMatrixName

The name of the design matrix within dgeObj to use for contrast analysis (required)

contrastList

A named list of contrasts (required)

contrastSetName

Name for the set of contrasts specified in contrastList. Defaults to "fitName_cf". Change only if you need to create 2 or more contrast sets from the same fit.

runTopTable

runs topTable on the specified contrasts (Default = TRUE)

runTopTreat

runs topTreat on the specified contrasts (Default = FALSE)

FoldChangeThreshold

Only applies to TopTreat (Default = 1.5)

PvalueThreshold

Default = 0.01

FDRthreshold

Default = 0.1

runEBayes

Runs eBayes after contrast.fit (default = TRUE)

robust

eBayes robust option (default = TRUE)

proportion

Proportion of genes expected to be differentially expressed (used by eBayes) (Default = 0.01)

Qvalue

Set TRUE to include Qvalues in topTable output (Default=FALSE)

IHW

Set TRUE to add FDR values from the IHW package (Defulat=FALSE)

verbose

Set TRUE to print some information during processing (Default=FALSE)

Details

The contrastList is a named list composed of column names from the DesignMatrix of the DGEobj. Each contrast is named to give it a short recognizable name.

Example contrastList

contrastList = list(
T1 = "treatment1 - control",
T2 = "treatment2 - control"
)

where treatment1, treatment2 and control are columns in the DesignMatrix

The returned ContrastAnalysis list contains the following objects:

Value

The DGEobj with contrast fits and topTable/topTreat dataframes added.

Author(s)

John Thompson, jrt@thompsonclan.org

Examples

1
2
3
4
#run defaults
myDgeObj  = runContrasts (myDgeObj, myFitName, ConstrastList)
myDgeObj  = runContrasts (myDgeObj, myFitName, ConstrastList, runTopTable = TRUE
       runTopTreat=TRUE, FoldChangeThreshold = 1.25)

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