Alpha Diversity plug-in Shannon

Hi QIIME2,

I am trying to find the alpha diversity of my excel sheet of taxatable genus and taxatable species through QIIME2. I have successfully downloaded qiime2 through an anaconda environment. I was able to convert my excel sheets to a TSV file and then with qiime into a BIOM file. After being able to use qiime2 tools to import my data, I used these commands to achieve alpha diversity.

qiime diversity alpha
--i-table /path/to/your/species_table.qza
--p-metric shannon
--o-alpha-diversity /path/to/your/shannon_alpha_diversity.qza

The issue is that I can’t see the calculations as to how QIIME2 is calculating the data. Because I have done the shannon index manually on a few of the species in a patient, and it hasn’t been the same number as qiime 2 is giving me. I used chat gpt plus to calculate the shannon index on the samples and they got the same answer as me. There are 97 tax species formatted on the rows, and 83 patients on the columns. The shannon index I calculated was 1.817, and qiime2 calculated 2.703 so we are off by a lot. My calculations begin by adding up the total abundance of the species/genus in a patient, then finding the relative abundance (p), taking the natural log of p, and then multiplying the former with the latter, and then adding up all ln(p) * p to get the shannon index. Would you please show me the step by step way that qiime2 is calculating alpha diversity through shannon index. Thank you!

Hello Jama,

Welcome to the forums! :qiime2:

I suspect this is the issue.

While you are using the nature log a.k.a. base e, any other log base is also valid, as discussed before. :upside_down_face:

Can you rerun this with log2 and confirm the qiime2 output?

1 Like

Hi Colin,

Thank you so much for your help. It did indeed turn to the qiime2 calculation. :blush:

3 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.