set_DESeq2 {benchdamic}R Documentation

set_DESeq2

Description

Set the parameters for DESeq2 differential abundance detection method.

Usage

set_DESeq2(
  pseudo_count = FALSE,
  design = NULL,
  contrast = NULL,
  alpha = 0.05,
  norm = c("ratio", "poscounts", "iterate"),
  weights_logical = FALSE,
  expand = TRUE
)

Arguments

pseudo_count

add 1 to all counts if TRUE (default pseudo_count = FALSE).

design

(Required). A formula which specifies the design of the experiment, taking the form formula(~ x + y + z). That is, a formula with right-hand side only. By default, the functions in this package and DESeq2 will use the last variable in the formula (e.g. z) for presenting results (fold changes, etc.) and plotting. When considering your specification of experimental design, you will want to re-order the levels so that the NULL set is first. For example, the following line of code would ensure that Enterotype 1 is used as the reference sample class in tests by setting it to the first of the factor levels using the relevel function:

sample_data(entill)$Enterotype <- relevel(sample_data(entill)$Enterotype, "1")

contrast

character vector with exactly three elements: the name of a factor in the design formula, the name of the numerator level for the fold change, and the name of the denominator level for the fold change.

alpha

the significance cutoff used for optimizing the independent filtering (by default 0.05). If the adjusted p-value cutoff (FDR) will be a value other than 0.05, alpha should be set to that value.

norm

name of the normalization method used to compute the normalization factors to use in the differential abundance analysis. If norm is equal to "TMM", "TMMwsp", "RLE", "upperquartile", "posupperquartile", "CSSmedian", "CSSdefault", "TSS" the scaling factors are automatically transformed into normalization factors.

weights_logical

logical vector, if TRUE a matrix of observational weights will be used for differential abundance analysis (default weights_logical = FALSE).

expand

logical, if TRUE create all combinations of input parameters (default expand = TRUE).

Value

A named list containing the set of parameters for DA_DESeq2 method.

See Also

DA_DESeq2

Examples

# Set some basic combinations of parameters for DESeq2
base_DESeq2 <- set_DESeq2(design = ~ group, contrast = c("group", "B", "A"))
# Set a specific set of normalization for DESeq2 (even of other packages!)
setNorm_DESeq2 <- set_DESeq2(design = ~ group, contrast =
    c("group", "B", "A"), norm = c("TMM", "poscounts"))
# Set many possible combinations of parameters for edgeR
all_DESeq2 <- set_DESeq2(pseudo_count = c(TRUE, FALSE), design = ~ group,
    contrast = c("group", "B", "A"), weights_logical = c(TRUE,FALSE))

[Package benchdamic version 1.0.0 Index]