Hi Jordan,
Thanks for the great tool and tutorial! I have been able to complete all steps in the tutorial before the phyloseq part except for making the final plot with beta and alpha diversity combined (the alpha diversity one works fine). For some reason, the SampleID’s in my beta diversity file seem to be characters instead of numeric. I am getting the error:
Error: Can’t join on ‘#SampleID’ x ‘#SampleID’ because of incompatible types (character / numeric)
When I use the code:
pcouw$data$Vectors %>%
rename("#SampleID"=SampleID) %>% #rename to match the metadata table
left_join(metadata_phylogeny) %>%
left_join(shannon_phylo$data %>% rownames_to_column("#SampleID")) %>%
ggplot(aes(x=PC1, y=PC2, shape=SubjectNumber, color=visitnumber, size=shannon)) +
geom_point() +
xlab(paste("PC1: ", round(100pcouw$data$ProportionExplained[1]), “%”)) +
ylab(paste("PC2: ", round(100pcouw$data$ProportionExplained[2]), “%”)) +
theme_bw() +
ggtitle(“Unweighted UniFrac”)
Any ideas why this might be happening?
Thanks in advance!