However, I'm trying to obtain a da-barplot with the taxonomic information in my Feature ID summarized just to the lowest possible taxonomic level, as shown in the image below:
I know that somes features, even setting the taxa-collapse to level-5, will not arrive to the family level. But if ANCOM-BC detected as relevant for the differential abundance analysis, I want to retain as the image indicates "Proteobacteria" for example.
Is there any modifications that I can do in my code to retain only the lowest taxonomic level?
Hello!
As far as I know, there is no direct way of doing that in Qiime2, at least in the current versions.
But I faced similar issues and found several workarounds. I will list them, starting from my favorite, choose one:
extract all the tables from differentials.qza file (not the visualization) and replot it in Python (or R)
Modify taxonomy file. You need to extract taxonomy.tsv file from taxonomy.qza artifact, modify "Taxon" column so it would contain only Family or last available rank, then import it back as taxonomy-family.qza file, then collapse your feature table using created taxonomy file, but this time to level 1 (because now you have only one rank). Then run Ancombc.
Extract feature-table.biom file from your already collapsed to family level table, convert it to tsv format, modify it so it would contain only last available rank, convert back to biom and import to Qiime2 as feature table. Then run ancombc.
Save image from visualization as svg file and edit legend in svg editor
Open image directly from visualization in Vega editor and modify the labels.