Beta diversity analysis in R using Qimme 2 generated qza files

Hello, I had earlier run beta diversity analysis in qimme 2 and obtained two types of files for each beta diversity matrix, pcoa.qza, distance.qza. I was also able to export these files to R (using qiime2R) where I was able to generate PCoA plots, however I do not know how to generate the distance box plots and do statistical analysis using permanova etc. using the same files. Is there a way I can do the same in R using these files without any additional packages such as phyloseq/vegan.

1 Like

You could reimplement these stat tests if you wanted, but it's probably easier to use the existing packages like Vegan.

--

Can you help me understand the context of your question? Would you rather do these stat tests in Python? Are you limited on the number of R packages you can install on your system and have to use base-r only?

Let's zoom out :ringer_planet: :telescope:

1 Like

Hi Colin, Thanks for your answer. I do not have any limitation as to the R packages I can install, I am just trying to do the analysis using R/dplyr without having to use phyloseq. I was able to analyze my data so far having no issues with alpha diversity/taxonomy.
However with Beta diversity I was not able to do the same.
Could you please guide me if I would be able to use the vegan package with the beta diversity file already generated by qiime2(pcoa.qza, distance.qza) or I need to start from the beginning with table.qza.

1 Like

I hear you. Phyloseq is awesome, but it's no longer being actively developed.

I'm glad you have found the Tidyverse packages and Vegan. While Phyloseq provides the data structures, the stats tests themselves are implemented in Vegan so once you reformat your data you should be able to use that.

For stat tests specifically, I would recommend rstatix. Once you have done the microbiome calculations like building a distance matrix of unifrac distances, rstatix is great for building the formulas / blocking and performing tests. See this tutorial https://www.datanovia.com/en/lessons/one-way-manova-in-r/

Thank you so much. I am going to try rstatix.

1 Like