biocore / qiime

Official QIIME 1 software repository. QIIME 2 (https://qiime2.org) has succeeded QIIME 1 as of January 2018.
GNU General Public License v2.0
285 stars 269 forks source link

shannon diversity calc #403

Open wdwvt1 opened 11 years ago

wdwvt1 commented 11 years ago

a user submitted a question on the forum regarding our shannon diversity calcs. the shannon diversity calc that occurs in alpha_diversity.py uses log base 2 rather than ln because we report the entropy in bits. the person wants the ability to choose the base which i think we should to the script.

so the feature request: add an ability to the alpha_diversity.py script that allows the user to specify the base of the log used. defaults to 2 like we have it now.

gregcaporaso commented 11 years ago

to avoid complicating the interface too much, it's probably better just to define an additional metric (e.g., shannon_ln) than add a new parameter to the script. @wdwvt1 or @justin212k, do you think this is useful, and if so are either of you interested in taking this on?

justin212k commented 11 years ago

I agree that it's not worth the interface clutter to allow arbitrary bases. I guess we'd add the shannon_ln (and maybe base 10, would anyone want that?) to the pycogent repository, then add a backport of pycogent's maths/stats/alpha_diversity.py to qiime. Any ideas on simpler approaches?