runDiffTest: Performs differential abundance testing

Description Usage Arguments Details Value Examples

View source: R/differential_functions.R

Description

This function performs differential abundance testing between groups of a specified phenotype. Four methods are available: limma, Kruskal-Wallis, ZILN and DESeq2 (see details).

Usage

1
2
3
4
5
6
7
8
9
runDiffTest(
  aggdat,
  level,
  phenotype,
  phenolevels = NULL,
  log = TRUE,
  coef = NULL,
  method = c("limma", "Kruskal-Wallis", "ZILN", "DESeq2")
)

Arguments

aggdat

aggregated MRExperiment

level

Feature level.

phenotype

Phenotype to test.

phenolevels

levels of the phenotype to restrict the comparison to

log

Log2 transform data. Default is TRUE.

coef

Numeric which indicates which pairwise comparison to analyze when there are more than two groups. Corresponds to the column number of the model matrix produced by designPairs(). If NULL, a test of any difference between all groups is performed.

method

Differential testing method. One of "limma" (default), "Kruskal-Wallis", "ZILN", or "DESeq2".

Details

limma is a differential expression tool for microarray data using linear models. It can also be applied to microbiome data.

The Kruskal-Wallis test is a non-parametric rank test which examines if groups come from the same distribution. A significant result indicates at least one group is distributionally different than another group.

ZILN is a zero-inflated log-normal model implemented in fitFeatureModel() of the metagenomeSeq package.

DeSeq2 performs differential gene expression analysis based on the negative binomial distribution

Value

data.frame holding results of the differential analysis

Examples

1
2
3
4
data("mouseData", package = "metagenomeSeq")
aggdat <- aggFeatures(mouseData, level = "genus")
runDiffTest(aggdat = aggdat,level = "genus", 
            phenotype = "diet", method = "Kruskal-Wallis")

microbiomeExplorer documentation built on Nov. 8, 2020, 8:16 p.m.