# Different Shannon diversity results between QIIME2 and phyloseq

**URL:** https://forum.qiime2.org/t/different-shannon-diversity-results-between-qiime2-and-phyloseq/14136
**Category:** User Support
**Created:** [March 20, 2020, 2:31pm UTC](https://forum.qiime2.org/t/different-shannon-diversity-results-between-qiime2-and-phyloseq/14136 "2020-03-20T14:31:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)
#### Post date: [March 20, 2020, 2:31pm UTC](https://forum.qiime2.org/t/different-shannon-diversity-results-between-qiime2-and-phyloseq/14136/1 "2020-03-20T14:31:30Z")

</div>

Hello everyone,

as I was wondering today through my alpha diversity measures from QIIME2 and phyloseq I found differences in all my samples' Shannon diversity measures, but curiously not in my Simpson diversity measures. I wonder why would that happen if the same table is being used in both programs. I checked samples, features abundances and they are the same, I guess the Shannon diversity formula implemented is the same either. Do you have any idea of what is going on?

I was going to check if there is a linearity between the Inverse Simpson index (1/D) calculated by phyloseq's estimate richness, and the exponential of the Shannon index (e^H') based on my H' provided by QIIME2, as suggested by phyloseq's supporting information. Right before doing it I found those differences.

I appreciate any help or insights,  
Thank you,  
Felipe.

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 20, 2020, 2:55pm UTC](https://forum.qiime2.org/t/different-shannon-diversity-results-between-qiime2-and-phyloseq/14136/2 "2020-03-20T14:55:54Z")

</div>

Hi @Felipe_Rocha,  
Please see here:

> [@shannon index value](https://forum.qiime2.org/t/shannon-index-value/11649/4):
>
> Hello Ana, A bunch of things can affect the Shannon index. Switching from OTUs to ASVs can change it. man_shrugging The Shannon index uses a log scale, but it can use log2 or log10 or natural log, and all of these are perfectly valid nobody EVER reports which one they are using! scream_cat This sounds crazy. And it is. And yet if you look in [the original Shannon entropy paper](https://www.lirmm.fr/~strauss/MasterEEA/Echantillonnage/Publi%20Shannon.pdf) that has 69,200 citations, all three of these log bases are mentioned on page one: The choice of a logarithmi…

---

<div class="post-metadata">

### Author: ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)
#### Post date: [March 20, 2020, 5:18pm UTC](https://forum.qiime2.org/t/different-shannon-diversity-results-between-qiime2-and-phyloseq/14136/3 "2020-03-20T17:18:17Z")

</div>

Thanks, @Nicholas_Bokulich, I haven't thought about the log scale used. I think it might be it.

Do you know the log scale used by QIIME2?

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 20, 2020, 5:21pm UTC](https://forum.qiime2.org/t/different-shannon-diversity-results-between-qiime2-and-phyloseq/14136/4 "2020-03-20T17:21:19Z")

</div>

looks like it's base 2: [http://scikit-bio.org/docs/0.5.4/generated/generated/skbio.diversity.alpha.shannon.html](http://scikit-bio.org/docs/0.5.4/generated/generated/skbio.diversity.alpha.shannon.html)

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [April 20, 2020, 11:21pm UTC](https://forum.qiime2.org/t/different-shannon-diversity-results-between-qiime2-and-phyloseq/14136/5 "2020-04-20T23:21:21Z")

</div>

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