Here's my situation: I'm doing an analysis of soil communities under 5 different irrigation regimes (100%, 75%, 50%, 25%, 0% moisture) and 3 different soil depths (surface, immediate subsurface, lower subsurface). I have an OTU table from 16S amplicon data, and what I would like to do is find which taxa (whether at the phylum level, class level, or all the way down to OTU level) are significantly associated with the transition from 'low' to 'high' values (or vice versa) for these categorical variables: e.g. which groups decrease in abundance as there is less moisture and which increase? Obviously you can just look at a relative abundance plot, but I'd like a good statistical test for this. Preferably something that can be implemented in R. Currently I'm doing simple Spearman / Pearson correlations between abundances and the categorical variable levels, but there's probably a much better way to do this. Thanks for any help!