set_linda: set_linda

View source: R/DA_linda.R

set_lindaR Documentation

set_linda

Description

Set the parameters for linda differential abundance detection method.

Usage

set_linda(
  assay_name = "counts",
  formula = NULL,
  contrast = NULL,
  is.winsor = TRUE,
  outlier.pct = 0.03,
  zero.handling = c("pseudo-count", "imputation"),
  pseudo.cnt = 0.5,
  alpha = 0.05,
  p.adj.method = "BH",
  expand = TRUE
)

Arguments

assay_name

the name of the assay to extract from the TreeSummarizedExperiment object (default assayName = "counts"). Not used if the input object is a phyloseq.

formula

Character. For example: formula = '~x1*x2+x3+(1|id)'. At least one fixed effect is required.

contrast

character vector with exactly, three elements: a string indicating the name of factor whose levels are the conditions to be compared, the name of the level of interest, and the name of the other level.

is.winsor

Boolean. If TRUE (default), the Winsorization process will be conducted for the OTU table.

outlier.pct

A real value between 0 and 1; Winsorization cutoff (percentile) for the OTU table, e.g., 0.03. Default is NULL. If NULL, Winsorization process will not be conducted.

zero.handling

Character. Specifies the method to handle zeros in the OTU table. Options are "pseudo-count" or "imputation" (default is "pseudo-count"). If "imputation", zeros in the OTU table will be imputed using the formula in the referenced paper. If "pseudo-count", a small constant (pseudo.cnt) will be added to each value in the OTU table.

pseudo.cnt

A positive real value. Default is 0.5. If zero.handling is set to "pseudo-count", this constant will be added to each value in the OTU table.

alpha

A real value between 0 and 1; significance level of differential abundance. Default is 0.05.

p.adj.method

Character; p-value adjusting approach. See R function p.adjust. Default is 'BH'.

expand

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

Value

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

See Also

DA_linda

Examples

# Set some basic combinations of parameters for ANCOM with bias correction
base_linda <- set_linda(formula = "~ group", contrast = c("group", "B", "A"), 
    zero.handling = "pseudo-count", expand = TRUE)
many_linda <- set_linda(formula = "~ group", contrast = c("group", "B", "A"), 
    is.winsor = c(TRUE, FALSE), 
    zero.handling = c("pseudo-count", "imputation"), expand = TRUE)

mcalgaro93/benchdamic documentation built on Nov. 23, 2024, 5:06 p.m.