DA.lao: ANOVA

View source: R/DA.lao.R

DA.laoR Documentation

ANOVA

Description

Apply ANOVA on multiple features with one predictor, with log transformation of counts before normalization.

Usage

DA.lao(
  data,
  predictor,
  covars = NULL,
  relative = TRUE,
  p.adj = "fdr",
  delta = 1,
  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. Factor, 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)

relative

Logical. Should data be normalized to relative abundances. Default TRUE

p.adj

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

delta

Numeric. Pseudocount for the log transformation. Default 1

allResults

If TRUE will return raw results from the aov function

...

Additional arguments for the aov functions

Value

A data.frame with with results.

Examples

# Creating random count_table and predictor
set.seed(4)
mat <- matrix(rnbinom(1500, size = 0.1, mu = 500), nrow = 100, ncol = 15)
rownames(mat) <- 1:100
pred <- c(rep("A", 5), rep("B", 5), rep("C", 5))

# Running ANOVA on each feature
res <- DA.lao(data = mat, predictor = pred)

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