I am developing a plugin which is a Python wrapper for a package in R that produces taxonomic abundance stacked bar plots. This plugin takes QIIME artifacts (out table, feature table, metadata, and tree) as input, but I'm not sure how to handle the resulting plot. Does anyone have advice or guidance on converting .png files to .qzv files? I'm having trouble finding clear documentation on this.
Yes, you can .png files in the qzv, and then create an index.html file (also in the qzv) that includes them with <img> tags. Example code on GitHub
Most plugins don't do it quite like this because there is an even better way!
I also use R/tidyverse so I'm guessing your pipeline looks like this
.qza -> R stuff -> ggplot -> .png figure
I would suggest something like this:
.qza -> R stuff -> ggplot -> ggplotly() -> .html file
.qza -> R stuff -> rbokeh -> .html file
The goal is to save figures as HTML elements instead of raster images, which not only makes them infinitely scalable but also can make them interactive in useful ways.