A library for working with phylogenetic data.
v0.25.0
diversity.cpp File Reference
#include "genesis/population/functions/diversity.hpp"
#include "genesis/utils/containers/matrix.hpp"
#include "genesis/utils/containers/function_cache.hpp"
#include "genesis/utils/math/common.hpp"
#include <cassert>
#include <cmath>
#include <mutex>
#include <stdexcept>
#include <unordered_map>

Go to the source code of this file.

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::population
 

Functions

double a_n (size_t n)
 Compute a_n, the sum of reciprocals. More...
 
double alpha_star (double n)
 Compute alpha* according to Achaz 2008 and Kofler et al. 2011. More...
 
double amnm_ (size_t poolsize, size_t nucleotide_count, size_t allele_frequency)
 Local helper function to compute values for the denominator. More...
 
double b_n (size_t n)
 Compute b_n, the sum of squared reciprocals. More...
 
double beta_star (double n)
 Compute beta* according to Achaz 2008 and Kofler et al. 2011. More...
 
double f_star (double a_n, double n)
 Compute f* according to Achaz 2008 and Kofler et al. 2011. More...
 
double heterozygosity (BaseCounts const &sample)
 Compute classic heterozygosity. More...
 
double n_base (size_t coverage, size_t poolsize)
 Compute the n_base term used for Tajima's D in Kofler et al. 2011, using a faster closed form expression. More...
 
double n_base_matrix (size_t coverage, size_t poolsize)
 Compute the n_base term used for Tajima's D in Kofler et al. 2011, following their approach. More...
 
genesis::utils::Matrix< double > pij_matrix_ (size_t max_coverage, size_t poolsize)
 
genesis::utils::Matrix< double > const & pij_matrix_resolver_ (size_t max_coverage, size_t poolsize)
 
double tajima_d_pool_denominator (PoolDiversitySettings const &settings, size_t snp_count, double theta)
 Compute the denominator for the pool-sequencing correction of Tajima's D according to Kofler et al. More...
 
double theta_pi_pool_denominator (PoolDiversitySettings const &settings, size_t nucleotide_count)
 Compute the denominator for the pool-sequencing correction of theta pi according to Kofler et al. More...
 
double theta_watterson_pool_denominator (PoolDiversitySettings const &settings, size_t nucleotide_count)
 Compute the denominator for the pool-sequencing correction of theta watterson according to Kofler et al. More...