skbio.diversity.alpha.ace¶
- skbio.diversity.alpha.ace(counts, rare_threshold=10)[source]¶
Calculate the ACE metric (Abundance-based Coverage Estimator).
State: Experimental as of 0.4.0.
The ACE metric is defined as:
\[S_{ace}=S_{abund}+\frac{S_{rare}}{C_{ace}}+ \frac{F_1}{C_{ace}}\gamma^2_{ace}\]where \(S_{abund}\) is the number of abundant OTUs (with more than rare_threshold individuals) when all samples are pooled, \(S_{rare}\) is the number of rare OTUs (with less than or equal to rare_threshold individuals) when all samples are pooled, \(C_{ace}\) is the sample abundance coverage estimator, \(F_1\) is the frequency of singletons, and \(\gamma^2_{ace}\) is the estimated coefficient of variation for rare OTUs.
The estimated coefficient of variation is defined as (assuming rare_threshold is 10, the default):
\[\gamma^2_{ace}=max\left[\frac{S_{rare}}{C_{ace}} \frac{\sum^{10}_{i=1}{{i\left(i-1\right)}}F_i} {\left(N_{rare}\right)\left(N_{rare}-1\right)} -1,0\right]\]- Parameters:
- Returns:
Computed ACE metric.
- Return type:
double
- Raises:
ValueError – If every rare OTU is a singleton.
Notes
ACE was first introduced in [1] and [2]. The implementation here is based on the description given in the EstimateS manual [3].
If no rare OTUs exist, returns the number of abundant OTUs. The default value of 10 for rare_threshold is based on [4].
If counts contains zeros, indicating OTUs which are known to exist in the environment but did not appear in the sample, they will be ignored for the purpose of calculating the number of rare OTUs.
References