PairwiseDESeq2 {grandR}R Documentation

Perform Wald tests for differential expression

Description

Apply DESeq2 for comparisons defined in a contrast matrix, requires the DESeq2 package.

Usage

PairwiseDESeq2(
  data,
  name.prefix = mode,
  contrasts,
  separate = FALSE,
  mode = "total",
  normalization = mode,
  logFC = FALSE,
  verbose = FALSE
)

Arguments

data

the grandR object

name.prefix

the prefix for the new analysis name; a dot and the column names of the contrast matrix are appended; can be NULL (then only the contrast matrix names are used)

contrasts

contrast matrix that defines all pairwise comparisons, generated using GetContrasts

separate

model overdispersion separately for all pairwise comparison (TRUE), or fit a single model per gene, and extract contrasts (FALSE)

mode

compute LFCs for "total", "new", or "old" RNA

normalization

normalize on "total", "new", or "old" (see details)

logFC

compute and add the log2 fold change as well

verbose

print status messages?

Details

DESeq2 by default performs size factor normalization. When computing differential expression of new RNA, it might be sensible to normalize w.r.t. to total RNA, i.e. use the size factors computed from total RNA instead of computed from new RNA. This can be accomplished by setting mode to "new", and normalization to "total"!

Value

a new grandR object including a new analysis table. The columns of the new analysis table are

See Also

LFC,GetContrasts

Examples


sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
                  design=c(Design$Condition,Design$dur.4sU,Design$Replicate))
sars <- subset(sars,Coldata(sars,Design$dur.4sU)==2)
sars<-PairwiseDESeq2(sars,mode="total",
                              contrasts=GetContrasts(sars,contrast=c("Condition","Mock")))
sars<-PairwiseDESeq2(sars,mode="new",normalization="total",
                              contrasts=GetContrasts(sars,contrast=c("Condition","Mock")))
head(GetAnalysisTable(sars,column="Q"))



[Package grandR version 0.2.0 Index]