First of all, thank you so much for this tutorial @jbisanz. It’s so so helpful.
So, I am trying to generate some PCoA plots for my data and have adapted the given code as follows,
uwunifrac$data$Vectors %>% select(SampleID, PC1, PC2) %>% left_join(metadata) %>% left_join(shannon) %>% ggplot(aes(x=PC1, y=PC2, color=`Type`, shape=`Day`, size=shannon)) + geom_point(alpha=0.5) + theme_q2r() + scale_size_continuous(name="Shannon Diversity") + scale_color_viridis_d(name="Milled Conditions")
So, essentially very similar, except I changed the axes. However, I am getting the following warnings and about half my data isn’t getting plotted,
Warning messages: 1: Column `SampleID` joining factors with different levels, coercing to character vector 2: Removed 48 rows containing missing values (geom_point).
I checked to confirm that the order of my SampleIDs match up in both the metadata and the Unweighted UniFrac PCoA files. When I visualize them on QIIME2, they look fine to me. I was hoping you could help me figure this out. Thanks for your help!