A library for working with phylogenetic and population genetic data.
v0.32.0
diversity_pool_functions.cpp File Reference
#include "genesis/population/function/diversity_pool_functions.hpp"
#include "genesis/utils/containers/function_cache.hpp"
#include "genesis/utils/containers/matrix.hpp"
#include "genesis/utils/math/binomial.hpp"
#include "genesis/utils/math/common.hpp"
#include <cassert>
#include <cmath>
#include <limits>
#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 (double 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 (double 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 (SampleCounts const &sample, bool with_bessel=false)
 Compute classic heterozygosity. More...
 
double n_base (size_t read_depth, 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 read_depth, 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_read_depth, size_t poolsize)
 
genesis::utils::Matrix< double > const & pij_matrix_resolver_ (size_t max_read_depth, size_t poolsize)
 
double tajima_d_pool_denominator (DiversityPoolSettings const &settings, double theta, size_t poolsize, double window_avg_denom, size_t empirical_min_read_depth)
 Compute the denominator for the pool-sequencing correction of Tajima's D according to Kofler et al. More...
 
double theta_pi_pool_denominator (DiversityPoolSettings const &settings, size_t poolsize, 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 (DiversityPoolSettings const &settings, size_t poolsize, size_t nucleotide_count)
 Compute the denominator for the pool-sequencing correction of theta watterson according to Kofler et al. More...