Updating to adonis2

Hey folks,

I was just wondering if there are any reasons why QIIME 2 couldn't upgrade its adonis() plugin to adonis2() which was introduced after vegan=2.5_7?
The most important benefit would be that adonis2 allows marginal testing of variables using the by="marginal" parameter and the output gives a partial R-squared for each variable in the model. In contrast, the current QIIME 2 version of adonis can only perform a sequential test of terms (equivalent to by="terms" in adonis2(), meaning the order of the variables in the formula is important with the residuals from the first term being passed on to the second term, then residuals from the 2nd to 3rd and so on. I suspect most users are not aware of this and it is easy to miss an important biological signal in your model if a term of interest is unintentionally shoved at the end of the formula.

8 Likes

Thanks for the suggestion @Mehrbod_Estaki ! I have opened an issue on q2-diversity to track this feature request:

Any interest in fixing this? :wink:

4 Likes

Thanks @Nicholas_Bokulich!

Would be happy to help any way I can. I just wanted to open the dialogue here in case vegan is used for other core plugins that may be affected after an update. Can discuss on the issue page too

1 Like

You should absolutely upgrade to vegan::adonis2 because vegan::adonis will be deprecated in the next release. My plan was to deprecate adonis already in the current CRAN release (vegan-2.6-2), but too many packages were still using adonis and there is now only a "soft" deprecation: function prints a message (not even a warning) that it will be deprecated in the next release.

The new adonis2 is mostly compatible with the old adonis. There are only differences in some internal items of the result object – and these items should not have been accessed by anybody anyway. However, it is a complete re-write and therefore renamed.

This is also a backward-compatible mode since adonis2 has been in vegan since version 2.4-0 with a promise that it will eventually replace adonis.

5 Likes

Thanks @Jari_Oksanen for taking the time to give your feedback here! Over at the github page I also propose switching completely to adonis2, so I'm glad that aligns with your suggestion here. I also didn't realize adonis2 was around since vegan 2.4-0 already, meaning this function already exists in the current QIIME 2 version which makes it much easer to update. :beers:

2 Likes

Hello! I'm just wondering about the update to adonis2. Is it already implemented in qiime2?

Thank you!

Not yet! The issue on GitHub is still the best place to track Qiime2 support.
If you want to use adonis2(), it's probably easiest to do so in R.

adonis2 adds functionality, but adonis and adonis1 are still perfectly valid!

2 Likes

Thanks for your reply! I am already using adonis2 in R. I'm just re-running some older analyses and I just thought it might come in handy to have adonis2 readily available within qiime2. :wink:

1 Like