Identify significant taxa using R-ANCOM-2

Hi Qiime2 community,

I had some unexpected results from q2-ANCOM and after an informative discussion in the forum, I tried ANCOM-2 in R using the original script provided by the authors of ANCOM. I have applied Random intercept models to detection differentially abundant taxa across different experimental groups while accounting for random effects and adjusting for other covariates. I have attached the volcano plot. Can I consider W value(340)as a significant result? if yes, whether there is a way to identify the differentially represented ASVs at Genes level? I am asking if there is a way to collapse taxa like we did when we use q2-ANCOM?
Rplot01

Best,
Maysa

Hi Maysa,

I believe the answer is yes, as that dashed line (W-0.7) represents the default significance threshold.

Yes again! You can pick the very same collapsed feature-table that you generated before using q2-ANCOM, load it in R using the qiime2R package and run the ANCOM R script with the collapsed feature-table.

Hope this helps!

1 Like

Hi Vitor,

Thank you for your reply and that was really help! I do run the collapsed feature-table but still can not report the significant features. I need to know whethere there is an association between S.suis and the groups of the study? So I need to get statistical results and Percentile abundances of features by group or at least the name of the features that significantly deference, like what q-ANCOM provides. Is that possible with ANCOM-R?

Maysa

I don’t know which ANCOM for R implementation you are using, but the one that I am familiar with (v2.1) used to output only a dataframe with features as row names and the W value, so I totally get your desire to have more information. I used to deal with this problem by “manually” calculating the percentiles in R (which are reported by default in q2-ANCOM). As you will have the feature-table loaded into your R environment, just merge that with your metadata and use simple dataframe manipulations to get the information you need. In fact, doing some things from scratch in R might actually give you more freedom to explore alternative ways of reporting differential abundances (other plot styles and abundance normalization methods) so that your ANCOM results become more intuitive/attractive.

2 Likes

Many thanks @vheidrich, I used ANCOM v2.1 as well and will try to extract the information I need and update you!

Maysa

1 Like

Hi @vheidrich,

When I explored the W value I got from the Random intercept model adjusted for other covariates step, most of the features have either 0 or Inf value! Only one feature (c7e204024c96419e8c8f45bf812acf1d) had a value of 1. Any possible explanation for the Inf values?

Best,
Maysa

1 Like

Hi,

Really odd! I am not familiar with using ANCOM out of the basic differential abundance between groups (non-adjusted) type of analysis. But maybe @Mehrbod_Estaki (who talked a lot about ANCOM in other topics) can help you with that.

Good luck

1 Like

Ok, let’s wait for @Mehrbod_Estaki. According to @mortonjt explanation of W value, this is the number of how many times ANCOM has rejected the null hypothesis.

Maysa

1 Like

Thank @vheidrich for lending a hand here, unfortunately an issue like this is better directed at the ANCOM developers in their github page, there’s a lot of missing info for me to reproduce this issue and make recommendations and I haven’t used ANCOM or ANCOM2 in a long while now. The infinity W scores is very odd indeed as those only be positive integers.
Also worth highlighting is ANCOM-BC (paper here) and manual here. In addition to lots of improvements, this version also produced p values which may negate some of the issues you are dealing with. Sorry couldn’t be more of a help.

3 Likes

Correct! W represents the number of null-hypotheses rejected when sub-testing the abundance of a feature normalized by the abundance of other features in the dataset (ratios). Let’s say you have feature A, feature B and feature C in your dataset. If you find a W value of 2 for feature A, that means that both ratios feature A/feature B and feature A/feature C were significantly altered across conditions, suggesting that feature A is significantly altered across conditions.

Actually, in ANCOM for R, that W is shown as the proportion of rejected null-hypotheses, so it makes your results even weirder as that numbers should be in the interval [0,1]. In the example I gave you above, ANCOM for R W would be 1, as 100% of the sub-tests were significant. W>0.7 is usually considered significant, but you can choose W threshold to be as stringent/loose as you like.

Sorry I can help you any further. Best thing you can do is follow the tips by @Mehrbod_Estaki.

2 Likes

Thank you both for your help, let me take another look to what @Mehrbod_Estaki have pointed.

Maysa