DA.abc: ANCOM-BC

View source: R/DA.abc.R

DA.abcR Documentation

ANCOM-BC

Description

Implementation of ANCOM-BC for DAtest

Usage

DA.abc(
  data,
  predictor,
  covars = NULL,
  out.all = NULL,
  p.adj = "fdr",
  coeff = 2,
  allResults = FALSE,
  ...
)

Arguments

data

Either a matrix with counts/abundances, OR a phyloseq object. If a matrix/data.frame is provided rows should be taxa/genes/proteins and columns samples

predictor

The predictor of interest. Either a Factor or Numeric, OR if data is a phyloseq object the name of the variable in sample_data(data) in quotation

covars

Either a named list with covariables, OR if data is a phyloseq object a character vector with names of the variables in sample_data(data)

out.all

If TRUE, will run global test which will produce one p-value for the predictor. If FALSE will run standard test and will output p-value from one level of the predictor specified by coeff. If NULL (default) set as TRUE for multi-class predictor and FALSE otherwise

p.adj

Character. P-value adjustment. Default "fdr". See p.adjust for details

coeff

Integer. The beta coefficient and p-value will be associated with this coefficient. This coefficient is by default compared to the intercept (1. level of predictor) Default 2, i.e. the 2. level of the predictor.

allResults

If TRUE will return raw results from the ancombc function

...

Additional arguments for the ancombc function

Value

A data.frame with with results.

Examples

# Creating random count_table and predictor
set.seed(4)
mat <- matrix(rnbinom(200, size = 0.1, mu = 500), nrow = 20, ncol = 10)
rownames(mat) <- 1:20
pred <- c(rep("Control", 5), rep("Treatment", 5))

# Running ANCOM-BC
res <- DA.abc(data = mat, predictor = pred)

Russel88/DAtest documentation built on March 24, 2022, 3:50 p.m.