Bio::Community::Alpha - Calculate the alpha diversity of a community
use Bio::Community::Alpha; my $alpha = Bio::Community::Alpha->new( -community => $community, -type => 'observed' ); my $richness = $alpha->get_alpha;
The Bio::Community::Alpha module calculates alpha diversity, i.e. the diversity contained within a community. Higer alpha diversity values indicate more diverse communities.
This module calculates different types of alpha diversity: richness, evenness, dominance and indices. Specifically, the following metrics are supported and can be specified using the type()
method:
Richness is the estimated number of species in a community. Some of these metrics base their estimate on species abundance data and need integer counts.
Observed richness S
.
Menhinick's richness S/sqrt(n)
, where n
is the total counts (observations).
Margalef's richness (S-1)/ln(n)
.
Bias-corrected chao1 richness, S+n1*(n1-1)/(2*(n2+1))
, where n1
and n2
are the number of singletons and doubletons, respectively. Particularly useful for data skewed by low-abundance species, e.g. microbial data.
Abundance-based Coverage Estimator (ACE).
First-order jackknife richness estimator, S+n1
.
Second-order jackknife richness estimator, S+2*n1-n2
.
Evenness or equitability, represents how similar in abundance members of a community are.
Buzas & Gibson's (or Sheldon's) evenness, e^H/S
. Ranges from 0 to 1.
Heip's evenness, (e^H-1)/(S-1)
. Ranges from 0 to 1.
Shannon's evenness, or the Shannon-Wiener index divided by the maximum diversity possible in the community. Ranges from 0 to 1.
Simpson's evenness, or the Simpson's Index of Diversity divided by the maximum diversity possible in the community. Ranges from 0 to 1.
Brillouin's evenness, or the Brillouin's index divided by the maximum diversity possible in the community. Ranges from 0 to 1. Note that the Math::GSL::SF module is needed to calculate this metric.
Hill's E_2,1
evenness, i.e. Simpson's Reciprocal index divided by e^H
.
McIntosh's evenness.
Camargo's eveness. Ranges from 0 to 1.
Dominance has the opposite meaning of evenness. It is not strictly speaking a diversity metrics since the higher the dominance, the lower the diversity.
Simpson's Dominance Index D
. Ranges from 0 to 1.
Berger-Parker dominance, i.e. the proportion of the most abundant species. Ranges from 0 to 1.
Indices (accounting for species abundance):
Shannon-Wiener index H
. Emphasizes richness and ranges from 0 to infinity.
Simpson's Index of Diversity 1-D
(or Gini-Simpson index), where D
is Simpson's dominance index. 1-D
is the probability that two individuals taken randomly are not from the same species. Emphasizes evenness and ranges from 0 to 1.
Simpson's Reciprocal Index 1/D
. Ranges from 1 to infinity.
Brillouin's index, appropriate for small, completely censused communities. Based on counts, not relative abundance. Note that the Math::GSL::SF module is needed to calculate this metric.
Hill's N_inf
index, the inverse of the Berger-Parker dominance. Ranges from 1 to infinity.
McIntosh's index. Based on counts, not relative abundance.
Florent Angly florent.angly@gmail.com
User feedback is an integral part of the evolution of this and other Bioperl modules. Please direct usage questions or support issues to the mailing list, bioperl-l@bioperl.org, rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
If you have found a bug, please report it on the BioPerl bug tracking system to help us keep track the bugs and their resolution: https://redmine.open-bio.org/projects/bioperl/
Copyright 2011-2014 by Florent Angly <florent.angly@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Function: Create a new Bio::Community::Alpha object Usage : my $alpha = Bio::Community::Alpha->new( ... ); Args : -community : See community(). -type : See type(). Returns : a new Bio::Community::Alpha object
Function: Get or set the community to process. Usage : my $community = $alpha->community(); Args : A Bio::Community object Returns : A Bio::Community object
Function: Get or set the type of alpha diversity metric to measure. Usage : my $type = $alpha->type; Args : String of the desired alpha diversity type ('observed' by default). See L</METRICS> for details. Returns : String of the desired alpha diversity type.
Function: Calculate the alpha diversity of a community. Usage : my $metric = $alpha->get_alpha; Args : None Returns : A number for the alpha diversity measurement. Undef is returned in special cases, e.g. when measuring the evenness or dominance in a community with no members.