ANCOM-BC visualization issue

Dear all,
I performed ANCOM-BC in qiime2 (v. 2024.10) and received a plot (at the bottom I posted all commands) which is not very readable (find attached).
bar-plot_dataloaflvl5_usa.qzv (331.0 KB)

I’d like to have all the names readable (maybe smaller font or just move bars a bit to the right?) and also display only those taxa that lfc values are higher than 1.5 and lower than -1.5.
Does anyone think that's possible?

Thank you! :blush:
Joanna

qiime taxa collapse
--i-table filtered-table_inv_nat.qza
--i-taxonomy taxonomy_new_16SO.qza
--p-level 2
--o-collapsed-table table-collapsedlvl2.qza
qiime composition ancombc
--i-table table-collapsedlvl2.qza
--m-metadata-file metadata_gotowe_inv_nat.txt
--p-formula Population
--p-reference-levels Population::USA
--p-alpha 0.05
--o-differentials dataloaflvl2.qza
qiime composition tabulate
--i-data dataloaflvl2.qza
--o-visualization dataloaflvl2.qzv
qiime composition da-barplot
--i-data dataloaflvl2.qza
--o-visualization bar-plot_dataloaflvl2.qzv

Hello!

There are several options that can be applied to achieve your goals.

For example, you can use following arguments to tweak da-barplot:

--p-significance-threshold 0.05 \
--p-effect-size-threshold 1.5

These options will only plot features with P-adj value less than 0.05 and absolute LFC >1.5.

You also can open barplots in Vega editor online (see the link in your visualization) to modify labels.

Another option is to modify your collapsed table before ancombc. Export to tsv, change labels as desired and import back.

And my favorite is just extract all the tables from da-barplot.qzv to Python3 / R and plot it.

Hope that one of the options will work for you.

Best,

2 Likes

Hi,
thank you for response!
I'd prefer to do it the first way, however there's been a problem:
qiime composition ancombc
--i-table table-collapsedlvl5.qza
--m-metadata-file metadata_merged3.txt
--p-formula Population
--p-reference-levels Population::USA
--p-significance-threshold 0.05
--p-effect-size-threshold 1.5
--o-differentials dataloaflvl5_15.qza

(1/2?) No such option: --p-significance-threshold
(2/2?) No such option: --p-effect-size-threshold

I know that: --p-alpha 0.05 works fine, but I can't find a way to adjust LFC displaying threshold.

Best!

There is no surprise that you got such error - you should provide these parameters for da-barplot visualization, not while running Ancombc command :sunglasses:

Right, my bad!
Once again - thank you :smiley: