test_differential_abundance_DESeq2: DESeq2 - negative binomial Wald test

Description Usage Arguments Value Examples

View source: R/diff_tests.R

Description

Run negative binomial Wald test using DESeq2 on all taxa in a phylseq object. If block is specified, then it is used as an additional factor. If block is NULL, then standard test is used.

Usage

1
2
test_differential_abundance_DESeq2(physeq, group, compare = NULL,
  block = NULL, cooksCutoff = TRUE)

Arguments

physeq

Phyloseq object.

group

Name of column in sample metadata to perform group-wise comparisons on.

compare

List of 2 groups to be compared, which are present in the group column.

block

Name of column in sample metadata to control for the group-wise comparisons.

cooksCutoff

Cook's cutoff passed on to contrast() function in DESeq2.

Value

Returns a list containing the following:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

# If there are only 2 levels for \code{Diet}
res <- test_differential_abundance_DESeq2(physeq, group = "Diet", block = "Gender")

# If there are multiple levels for \code{Diet}
res <- test_differential_abundance_DESeq2(physeq, group = "Diet", compare=c("Control", "High_Fat"), block = "Gender")
res <- test_differential_abundance_DESeq2(physeq, group = "Diet", compare=c("Control", "High_Fibre"), block = "Gender")

## End(Not run)

TBrach/MicrobiomeX documentation built on April 19, 2018, 12:25 a.m.