nonparDA: Non-parametric DA testing

View source: R/DAtesting.R

nonparDAR Documentation

Non-parametric DA testing

Description

Testing for differential abundance using non-parametric tests.

Usage

nonparDA(ps.obj, group = NULL, contrast = NULL, p.adjust.method = "BH", verbose = TRUE)

Arguments

ps.obj

A phyloseq object.

group

Name of one column in sample_table(ps.obj) used to group the samples.

contrast

Optional specification of which category levels to use, see below.

p.adjust.method

The method used for multiple testing correction, see p.adjust.

verbose

Logical to turn on/off output during computing.

Details

Performs a Kruskal-Wallis non-parametric test for differential abundance for each OTU in a phyloseq object.

The group must be the name of a column in sample_table(ps.obj) that splits the samples into groups.

If no contrast is specified, a Kruskal-Wallis test is performed, using all category levels, i.e. it tests if the abundance for at least one level deviates from at least one other level. If contrast contains one text it must one of the levels in group, and then the test is contrasting this level against all the others (A versus not A). If contrast contains two texts, both must be levels in group, and the test is contrasting the samples from these two levels only (A versus B).

Value

A table with the columns

  • OTU

  • statistic The Kruskal-Wallis test statistic

  • p.value Raw p-value.

  • p.adj Adjusted p-value due to multiple testing

Author(s)

Lars Snipen.


larssnip/midiv documentation built on Jan. 20, 2025, 6:22 p.m.