gavinmdouglas/FuncDiv

Alpha diversity indices (Simpson indices) ?

Closed this issue ยท 5 comments

Giving FuncDiv a try thanks for the new package
I have a quick query if you could help please

Regarding

  • gini simpson index
  • Simpson evenness

Do you know which one is the same as Simpson in estimate_richness() R documentation link here
Or both (gini simpson index and Simpson evenness) are different than the one in estimate_richness()?
Table of simpson output I got from estimate_richness() if you would like to have a look:
image

As an update according to estimate_richnness(), Gini-Simpson is equal to 1- Simpson
joey711/phyloseq#940, does this imply that Simpson evenness is the same as Simpson in estimate_richnness()?

Update2: I checked this link you shared re skbio.diversity in python
and found the following

  1. gini_index(data[, method])
  2. simpson_e(counts)
  3. simpson(counts)
    and couldn't find inverse Simpson?

I am confused, apologies if I missed something.

Thanks
M

Hi @marwa38,

The Gini-Simpson index is defined as shown here: http://scikit-bio.org/docs/latest/generated/skbio.diversity.alpha.simpson.html#skbio.diversity.alpha.simpson

And Simpson's evenness as defined here: http://scikit-bio.org/docs/latest/generated/skbio.diversity.alpha.simpson_e.html#skbio.diversity.alpha.simpson_e

I think you're right that Gini-Simpson should be the complement to what is computed by that function, although I would have to test it to be sure. I went with Gini-Simpson index as this was the form that was used predominately in prior contributional diversity analyses.

Cheers,

Gavin

Thanks @gavinmdouglas
I updated my query
I am running on a desktop at the moment so might not have the privilege to try different options as it seems it is long time to run.

I think you're right that Gini-Simpson should be the complement to what is computed by that function, although I would have to test it to be sure. I went with Gini-Simpson index as this was the form that was used predominately in prior contributional diversity analyses.

the alpha diversity function have already 3 Simpson indices

  1. gini_simpson_index
  2. simpsons_evenness
  3. inverse_simpson_index

image

Just for record will keep it here might be enriching to the discussion
image

Hi @marwa38,

Sorry I forgot about this thread!

I looked into the estimate_richness function in phyloseq, and saw that it calls the vegan function diversity.

From the doc page for the vegan function:

Both variants of Simpson's index are based on D = sum p_i^2. Choice simpson returns 1-D and invsimpson returns 1/D.

In FuncDiv, the inverse_simpson_index is the same as invsimpson, and gina_simpson_index is the same as simpson.

simpsons_evenness returns the (Inverse Simpson Index) / (Observed Richness) (as defined here).

Hopefully that clears up the differences!

Gavin

@gavinmdouglas thanks for this.
number of observed OTUs as a definition for the richness in simpsons_evenness that you kindly shared is the same definition of
of richness in FuncDiv? as I couldn't find richness as an index separately defined in http://scikit-bio.org/

Hi there,

Yes 'observed OTUs' refers to the number of different OTUs observed in the sequencing data for a sample.

Richness just means the number of different types of elements in a sample (in this case the taxa, which could be OTUs). People often like to emphasize that this is 'observed' richness in the sequencing data, rather than corresponding to the actual count of different taxa in reality (i.e., if you quantified systematically by eye in nature, which makes more sense for non-microbes).

Cheers,

Gavin