Long story short, I'm interested in creating some tools that can allow for different types of metadata to be merged together. Here are some use cases (for biplots)
Visualizing a biplot with feature metadata such the taxonomies. Doing so requires that you merge / create a metadata table of features.
Visualizing genome presence / absence on a biplot, but to do so requires you to have something like genome prediction from picrust to be converted to metadata.
Visualizing differential abundance values (from something like DEseq2, aldex2, stray, ...) directly on a biplot.
Any of the above tasks also apply to phylogenetic tree visualization
I know that Metadata object are now Artifacts. However, I have not seen any examples of plugins outputting metadata. Do these examples exist, or is there additional infrastructure required to make this happen?
TLDR, any format/view type that is viewable as metadata can be used as metadata. So, for example, PCoAResults (represented as OrdinationFormat) can be used as metadata (for example, metadata tabulate). This is because the format is viewable as metadata, which means, there is a transformer defined to go from OrdinationFormat to qiime2.Metadata:
Ok very cool - I didn't know that you can just pass in FeatureData[Taxonomy] as Metadata!
Now it makes more sense why the new differential type needed a Metadata transformer -- so maybe this should just work out of the box??
Is there a way to have a plugin output metadata? I am working on a plugin that would filter and match samples and want to output the modified sample metadata.
Unfortunately not at this time (we are still trying to figure out how to handle provenance tracking for this case). One workaround is to return a visualization that contains the metadata.
One tactic we take in many actions is to allow the table to be a subset of the metadata, that way metadata doesn't need to be updated.