Making alpha diversity Boxplots in R using .qza files from Qiime2 core-metrics-results

Dear Qiime2 experts,
I have completed alpha and beta diversity analysis using qiime2 and now trying to import following files faith_pd_vector.qza, shannon_vector.qza and observed_features_vector.qza from core-metrics-results folder into R to make box plots as shown below.

When looking online I found a link where phyloseq has been used to make some plots in R, however they haven't shown the original file that has been imported.
I'm not sure if it is even possible to import these files into R or do I need to import feature table and do alpha-diversity analysis in R to make such plots.

For reference I have attached following .qza and .qzv files for shannon diversity:
shannon_vector.qza (91.2 KB) shannon_vector.qzv (376.1 KB)

Can someone please help me import my files into R and make box-plots?

Thank you,
Govind

Hello!
Short answer is yes, you can export alpha diversity metrics.

Option 1.
qiime tools export alpha-diversity_vector.qza --output-dir alpha-diversity
Option 2. Just unzip your vector qza in terminal or R, navigate to Data subdirectory to find desired file.

Just read resulted file as a tsv table in R.

@timanix thank you for answering my question. However, I need script for making such figures in R.
Can you please be more specific or send me the script as I'm not an expert in R.
Thank you,
Govind

You can use this tutorial in R to plot exported alpha diversity metrics

Here is another tutorial which is Qiime2-specific

1 Like

Thank you @timanix. It was really helpful.