How to interpret the sign change on x-axis on Ancom Volcano Plots ?

Hello everyone,

My lab mate and I both ran the same commands for an ANCOM analysis in QIIME 2, but my results are showing a sign change on the x-axis while his results do not, and we can't explain why.

So did anybody see this in their results too and/or could explain where the sign change may come from and why it isn´t consistent ?

I´m also very unsure about the meaning of the x-axis, as I understand it shows the “effect” of the feature. So a positive figure means the feature has a big impact on the differences between the compared groups?

For better understanding, those are the commands we worked with. The only difference between original and changed is the order of Group A and B in the command.

# ANCOM for Probiotika, test AB original

qiime feature-table filter-samples \ --i-table table_collapsed_level7.qza \ --m-metadata-file Metadaten_Bonn.txt \ --p-where '[Probiotika] IN ("A","B")' \ --o-filtered-table table_collapsed_Probiotika_AB.qza

qiime composition add-pseudocount \ --i-table table_collapsed_Probiotika_AB.qza \ --o-composition-table table_compositional_Probiotika_AB.qza

qiime composition ancom \ --i-table table_compositional_Probiotika_AB.qza \ --m-metadata-file Metadaten_Bonn.txt \ --m-metadata-column Probiotika \ --o-visualization ancom_Probiotika_AB.qzv

# ANCOM for Probiotika, test BA changed

qiime feature-table filter-samples \ --i-table table_collapsed_level7.qza \ --m-metadata-file Metadaten_Bonn.txt \ --p-where '[Probiotika] IN ("B","A")' \ --o-filtered-table table_collapsed_Probiotika_BA.qza

qiime composition add-pseudocount \ --i-table table_collapsed_Probiotika_BA.qza \ --o-composition-table table_compositional_Probiotika_BA.qza

qiime composition ancom \ --i-table table_compositional_Probiotika_BA.qza \ --m-metadata-file Metadaten_Bonn.txt \ --m-metadata-column Probiotika \ --o-visualization ancom_Probiotika_BA.qzv

The following picture shows my results (only), you can see the sign change on the x-axis unlike my lab mates results, which display two identical volcano plots (not shown in this post).

I really appreciate any help and thank you in advance

Thank you for this detailed post!

Would you be able to post the two ancom_Probiotika_AB.qzv and ancom_Probiotika_BA.qzv files so we can take a look?

The ratio is probably just getting swapped between A/B and B/A, but I would rather check the file then speculate, ya know?

1 Like

Sorry for my late reply, these are the files:

ancom_Probiotika_AB_281025.qzv (2.2 MB)

ancom_Probiotika_BA.qzv (2.2 MB)

1 Like

Hey @confused_student!

We've been discussing this a bit offline, but what's happening is actually a bit more straight-forward than we were initially thinking.

The CLR values in the volcano plot are notably by feature and not feature x sample, this is because we are actually looking at a difference in means (after the CLR transform, making this a justifiable thing to do for compositional data).

So what is happening is we take all of the per-sample feature abundances, add the pseudocount to avoid divide-by-zero/log-of-zero issues, and then take the mean of all CLR transformed counts in the first group and subtract those from the second group.

This is where it isn't obvious: by filtering the table, you are ordering it, so it changes which the first group is and which the second.

This is equivalent to setting a reference level or intercept in a linear model (and actually basically is the same, just in CLR land).

So when you do A x B, you end up with the question, "is A enriched relative to B", and vice-versa when you switch the order. I somewhat think this is backwards, where I would expect A to act as the baseline or reference, but in any-case, this is what is happening.

2 Likes

Hi @confused_student is it the same metadata file? If you made modifications to it (i.e. sorted the rows), that could be interesting to investigate.

I checked the provenance and it is the same metadata in both cases (via shasum).

I think in this case, it is the table order which is most relevant, as the metadata is re-arranged and subsetted to match to table (see here).

1 Like

Thanks for your answer, I'm still not sure why this switch didn't appear in my lab mate's data. Shouldn't his data show the same sign change as mine, based on your explanation?

2 Likes

Yes it should. Could you post an example from your lab-mate's data? I would like to see the provenance and check the versions of various packages to see if that could explain it.