changing colors of arrows in rPCA biplot graphs, show arrow legend on graph

It looks like everyone has already addressed things pretty thoroughly :), but just to sum up -- as @timanix's code shows, it's possible to get the best of both worlds and avoid collapsing the table while still showing the taxonomy assignments in the biplot. Ideally this would be doable through Emperor (there's an open issue on it here), but for now I believe it'll require some external work (either relabeling the features before running DEICODE/Emperor, or moving the biplot into something like QIIME2R).

One caveat with the "relabeling features" solution is that their IDs need to be kept unique -- otherwise things will probably start breaking or behaving unexpectedly. @timanix's code handles this by including the original feature ID, which is a nice way to make sure that the feature IDs remain unique after including taxonomy stuff (since it's very plausible that multiple features could have the same taxonomic annotation, especially when "features" are ASVs). There's also been some discussion here before about how to handle including feature IDs in publications, in case you're interested. :qiime2:

2 Likes