degComps: Automatize the use of 'results()' for multiple comparisons

Description Usage Arguments Details Value Author(s) Examples

View source: R/results.R

Description

This function will extract the output of DESeq2::results() and DESeq2::lfcShrink() for multiple comparison using:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
degComps(
  dds,
  combs = NULL,
  contrast = NULL,
  alpha = 0.05,
  skip = FALSE,
  type = "normal",
  pairs = FALSE,
  fdr = "default"
)

Arguments

dds

DESeq2::DESeqDataSet obcject.

combs

Optional vector indicating the coefficients or columns fom colData(dds) to create group comparisons.

contrast

Optional vector to specify contrast. See DESeq2::results().

alpha

Numeric value used in independent filtering in DESeq2::results().

skip

Boolean to indicate whether skip shrinkage. For instance when it comes from LRT method.

type

Type of shrinkage estimator. See DESeq2::lfcShrink().

pairs

Boolean to indicate whether create all comparisons or only use the coefficient already created from DESeq2::resultsNames().

fdr

type of fdr correction. default is FDR value, lfdr-stat is for local FDR using the statistics of the test, lfdr-pvalue is for local FDR using the p-value of the test. fdrtools needs to be installed and loaded by the user

Details

Value

DEGSet with unSrunken and Srunken results.

Author(s)

Lorena Pantano

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(DESeq2)
dds <- makeExampleDESeqDataSet(betaSD=1)
colData(dds)[["treatment"]] <- sample(colData(dds)[["condition"]], 12)
  design(dds) <-  ~ condition + treatment
dds <- DESeq(dds)
res <- degComps(dds, combs = c("condition", 2),
                contrast = list("treatment_B_vs_A", c("condition", "A", "B")))
# library(fdrtools)
#res <- degComps(dds,contrast = list("treatment_B_vs_A"),
#                fdr="lfdr-stat")

DEGreport documentation built on Nov. 8, 2020, 7:23 p.m.