I am working on a 16S metagenomic dataset generated from Oxford Nanopore sequencing.
For the preprocessing and taxonomic assignment steps, I used the NaMeco (Nanopore Metagenomic Community) pipeline. NaMeco performed , quality filtering, and taxonomic classification of my read sequences.
After obtaining the feature table and taxonomy assignments from NaMeco, I imported these results into QIIME2 to run the downstream diversity analyses and visualizations. For the compositional analysis, I generated stacked bar plots using the standard command:
qiime taxa barplot
My issue arises when I visualize my results at taxonomic level 6 (Genus) for my manuscript. The legend generated by QIIME2 is far too long to fit properly within the width of a standard Word document or manuscript column.
The problem is that QIIME2 displays the full taxonomic hierarchy for each genus in the legend, rather than just the short genus name. For example, I get:
d__Bacteria;p__Firmicutes;c__Clostridia;o__Oscillospirales;f__Ruminococcaceae;g__Faecalibacterium
instead of simply:
Faecalibacterium
This makes the figure completely unreadable and impossible to integrate into a publication-ready manuscript.
My questions are:
Is there a native QIIME2 option (either via the command line or within the .qzv visualization interface) to automatically shorten the taxonomic labels in the legend? For example, can I configure QIIME2 to display only the genus epithet (e.g., only g__Faecalibacterium or even just Faecalibacterium) instead of the entire d__p__c__o__f__g__ path?
If this is not possible directly within QIIME2, what is the most straightforward and robust method to export my QIIME2 feature table and taxonomy into R (using phyloseq and ggplot2) to generate a clean, publication-quality bar plot? Ideally, I would like to display only the top 10–12 most abundant genera, group all the remaining genera into an "Other" category, and show only the short genus names in the legend.
I am currently using QIIME2 version 2025.7 If anyone has experience dealing with this specific issue (especially after using NaMeco) or has a recommended workflow (or R script) to clean up these figures, I would be very grateful for your advice!
Thank you in advance for your help.