NAME

Bio::Community::Alpha - Calculate the alpha diversity of a community

SYNOPSIS

  use Bio::Community::Alpha;
  
  my $alpha = Bio::Community::Alpha->new( -community => $community,
                                          -type      => 'observed'  );
  my $richness = $alpha->get_alpha;

DESCRIPTION

The Bio::Community::Alpha module calculates alpha diversity, i.e. the diversity contained within a community. Higer alpha diversity values indicate more diverse communities.

METRICS

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

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

Observed richness S.

menhinick

Menhinick's richness S/sqrt(n), where n is the total counts (observations).

margalef

Margalef's richness (S-1)/ln(n).

chao1

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.

ace

Abundance-based Coverage Estimator (ACE).

jack1

First-order jackknife richness estimator, S+n1.

jack2

Second-order jackknife richness estimator, S+2*n1-n2.

Evenness

Evenness or equitability, represents how similar in abundance members of a community are.

buzas

Buzas & Gibson's (or Sheldon's) evenness, e^H/S. Ranges from 0 to 1.

heip

Heip's evenness, (e^H-1)/(S-1). Ranges from 0 to 1.

shannon_e

Shannon's evenness, or the Shannon-Wiener index divided by the maximum diversity possible in the community. Ranges from 0 to 1.

simpson_e

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_e

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_e

Hill's E_2,1 evenness, i.e. Simpson's Reciprocal index divided by e^H.

mcintosh_e

McIntosh's evenness.

camargo

Camargo's eveness. Ranges from 0 to 1.

Dominance

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_d

Simpson's Dominance Index D. Ranges from 0 to 1.

berger

Berger-Parker dominance, i.e. the proportion of the most abundant species. Ranges from 0 to 1.

Indices

Indices (accounting for species abundance):

shannon

Shannon-Wiener index H. Emphasizes richness and ranges from 0 to infinity.

simpson

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_r

Simpson's Reciprocal Index 1/D. Ranges from 1 to infinity.

brillouin

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

Hill's N_inf index, the inverse of the Berger-Parker dominance. Ranges from 1 to infinity.

mcintosh

McIntosh's index. Based on counts, not relative abundance.

AUTHOR

Florent Angly florent.angly@gmail.com

SUPPORT AND BUGS

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

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.

APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

new

 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

community

 Function: Get or set the community to process.
 Usage   : my $community = $alpha->community();
 Args    : A Bio::Community object
 Returns : A Bio::Community object

type

 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.

get_alpha

 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.