Abstract
SUMMARY: Stacked barplots, though widely used in microbiome studies, can obscure important patterns in microbiome data. They omit rare taxa and can mask shifts that emerge at finer taxonomic levels. To address this issue, we introduce phylobar, an R package that interactively links stacked barplots with overview phylogenetic or taxonomic hierarchies. The interface allows users to collapse or expand subtrees, paint color palettes interactively, and search for specific taxa. This allows comparison across taxonomic resolutions that are hidden in static overviews. phylobar works with any omics data with hierarchical organization, including cell type hierarchies, as we demonstrate in a case study of immune cell composition in COVID-19 patients. AVAILABILITY AND IMPLEMENTATION: phylobar is available as an R package on GitHub. It uses the htmlwidgets library to link interactive D3 visualizations with R. The interactive plots can be embedded within R Markdown or Quarto notebooks, and views can be exported as vector graphics files. The package is open source and documented at https://mkdiro-O.github.io/phylobar.