# shannon index value

**URL:** https://forum.qiime2.org/t/shannon-index-value/11649
**Category:** User Support
**Created:** [September 24, 2019, 1:16pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649 "2019-09-24T13:16:48Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![annsantos](https://forum.qiime2.org/user_avatar/forum.qiime2.org/annsantos/32/5598_2.png) [@annsantos](https://forum.qiime2.org/u/annsantos)
#### Post date: [September 24, 2019, 1:16pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649/1 "2019-09-24T13:16:48Z")

</div>

Hi,

This is my shannon index

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/b/b79208b229c8b243f8fdb0b3813975ffc18e490f.png)

And i compared to other papers and, mine is much higher . I know that shannon index calculation can vary in terms of log right? If that is so, how i do compare?

Another question, the value of shannon index is the median right? (in the boxplot), how do i know the mean value?

Thank you

---

<div class="post-metadata">

### Author: ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)
#### Post date: [September 24, 2019, 1:48pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649/2 "2019-09-24T13:48:03Z")

</div>

Hi! Each box plot shows you the range of Shannon indieces for all your samples within certain group, with a mean indicated as well.  
The value of Shannon index can vary because of the source of your samples. In my case I have 4 different sources and Shannon index varies significantly between them.

---

<div class="post-metadata">

### Author: ![annsantos](https://forum.qiime2.org/user_avatar/forum.qiime2.org/annsantos/32/5598_2.png) [@annsantos](https://forum.qiime2.org/u/annsantos)
#### Post date: [September 24, 2019, 1:52pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649/3 "2019-09-24T13:52:51Z")

</div>

This is from oral microbiome, from two groups. Normally, the shannon index is from 3 to 4. Mine is 7

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [September 24, 2019, 2:26pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649/4 "2019-09-24T14:26:45Z")

</div>

Hello Ana,

> [@annsantos](#):
>
> Normally, the shannon index is from 3 to 4. Mine is 7

A bunch of things can affect the Shannon index. Switching from OTUs to ASVs can change it. 🤷‍♂️

* * *

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!_

🙀

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 logarithmic base corresponds to the choice of a unit for measuring information. If the base 2 is used the resulting units may be called binary digits, or more briefly _bits_...  
> If the base 10 is used the units may be called decimal digits...  
> In analytical work where integration and differentiation are involved the base e is sometimes useful.

The Shannon index is totally arbitrary, but the _difference_ in Shannon index between groups matters. I think you can safely report that the Shannon diversity is not significantly different between these two oral microbiome samples.

Colin

EDIT  
log 2(128) = 7  
log 10(10,000,000) = 7  
log e(1097) ~= 7  
log 🤷‍♂️(🤷‍♀️) = 7

* * *

**EDIT: [Qiime2 amplicon 2025.7](https://library.qiime2.org/quickstart/amplicon) uses log base e / natural log for Shannon!**

---

<div class="post-metadata">

### Author: ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)
#### Post date: [September 25, 2019, 7:46am UTC](https://forum.qiime2.org/t/shannon-index-value/11649/5 "2019-09-25T07:46:02Z")

</div>

Im going to jump in as well!

> [@colinbrislawn](#):
>
> Hello Ana,
> 
> ![](https://forum.qiime2.org/user_avatar/forum.qiime2.org/annsantos/40/5598_2.png) annsantos:
> 
> > Normally, the shannon index is from 3 to 4. Mine is 7
> 
> A bunch of things can affect the Shannon index. Switching from OTUs to ASVs can change it. 🤷‍♂️

Not to mention your sequencing platform, rarefaction depth, and seemingly, sometimes the phase of the moon (🌑 🌓 🌙)... okay probably not the last one, but it sometimes feels like that!

* * *

I actually think the absolute value of your alpha diversity isn't worth much. As Colin said, it's _so_ sensitive to each experiment. I've tried to move away from reporting (or showing) the actual number for alpha diversity in my analyses and have been trying to show it as a z-normalized value. For my case control study, that means my new alpha diversity is \frac{a - \mathrm{mean}(a\_{control})}{\mathrm{std}(a\_{control})}. It works okay if my data is asymptotically normal (which is true for my larger case-control studies) and helps get my collaborators and I away from the trap of giving the actual numeric value too much emphasis. (Although I will also say I do this with the alpha diversity export rather than the raw visualization.)

Best,  
Justine

---

<div class="post-metadata">

### Author: ![annsantos](https://forum.qiime2.org/user_avatar/forum.qiime2.org/annsantos/32/5598_2.png) [@annsantos](https://forum.qiime2.org/u/annsantos)
#### Post date: [September 25, 2019, 3:46pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649/6 "2019-09-25T15:46:26Z")

</div>

Hi, thank you for your feedback!

I am new in this field (microbiome) and with qiime. How do you export your alpha? Which file do you use?

Thank you

---

<div class="post-metadata">

### Author: ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)
#### Post date: [September 25, 2019, 4:43pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649/7 "2019-09-25T16:43:39Z")

</div>

Hi @annsantos,

You want the alpha diversity .qza (i.e. shannon.qza). You can do that via the python API, qiime2R, or simply using the [export functionality](https://docs.qiime2.org/2019.7/tutorials/exporting/) depending on how you want to process.

---

<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: [November 22, 2019, 8:47pm UTC](https://forum.qiime2.org/t/shannon-index-value/11649/10 "2019-11-22T20:47:44Z")

</div>

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