Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shannon’s diversity index (SH) #111

Open
yuntwang opened this issue Feb 23, 2021 · 4 comments
Open

Shannon’s diversity index (SH) #111

yuntwang opened this issue Feb 23, 2021 · 4 comments

Comments

@yuntwang
Copy link

Hi,
If my snp is bia-allelic, according to the formula: H=-ΣPilnPi
the range is 0-1.

Why is the value of this software so large, even greater than 1?

Hope to get the reply.
thanks.

@daveneti
Copy link
Collaborator

daveneti commented Feb 24, 2021 via email

@yuntwang
Copy link
Author

yuntwang commented Feb 25, 2021 via email

@xiekunwhy
Copy link

Hi @daveneti ,

I also want to know why SH >1,
SH = -Σi Pi lnPi or SH = -Σi Pi logPi, where Pi is a proportion (frequencies, probabilities), there for values should be in interval 0 ≤ SH ≤ 1.

But it large than 1 in corehunter papers.

Best,
Kun

@hermandebeukelaer
Copy link

Hi @xiekunwhy,

I assume you are referring to one of the first two Core Hunter papers. In CH 1 and CH 2, Shannon's index was not scaled properly. A value between 0 and 1 was computed for each marker separately, based on the allele frequencies of that marker only. Those values were summed across all markers. Hence this could lead to a value (substantially) greater than 1.

In Core Hunter 3 the formula has been adjusted to calculate the formula globally across all markers, and should always yield a value between 0 and 1.

Does this answer your question, or did you come across a dataset for which Core Hunter 3 still yields SH values greater than 1?

Kind regards,
Herman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants