This function performs a differential abundance test for all pairwise ratios between taxa.

add_codifab(ta, condition, conditions = NULL, max_taxa = 30)

Arguments

ta

A tidyamplicons object

condition

A binary variable in the sample table (unquoted)

conditions

A character vector with exactly two categories of the condition variable

max_taxa

The maximum number of taxa to use

Value

A tidyamplicons object with an extra table taxon_pairs

Details

A table called taxon_pairs will be added to the tidyamplicons object, with for each pair of a taxon and a reference taxon, the differential abundance of the taxon between the two conditions (with respect to the reference taxon). The test that is performed is a Wilcoxon rank sum test and the test statistic that is reported is the two-sample Hodges–Lehmann estimator (the median of all pairwise differences between the samples).

It is possible to supply the conditions to compare through the conditions argument. Other conditions than the two supplied will be removed from the data.