#include "genesis/population/filter/variant_filter.hpp"
#include "genesis/population/filter/sample_counts_filter.hpp"
#include "genesis/population/function/functions.hpp"
#include "genesis/population/variant.hpp"
#include <cassert>
#include <cmath>
#include <cstdint>
#include <iterator>
#include <limits>
#include <string>
#include <type_traits>
#include <vector>
Go to the source code of this file.
Classes | |
struct | DiversityPoolSettings |
Settings used by different pool-sequencing corrected diversity statistics. More... | |
Namespaces | |
genesis | |
Container namespace for all symbols of genesis in order to keep them separate when used as a library. | |
genesis::population | |
Enumerations | |
enum | TajimaDenominatorPolicy { kEmpiricalMinReadDepth, kProvidedMinReadDepth, kWithPopoolationBugs, kPoolsize, kUncorrected } |
Select how to compute the denominator for the pool sequencing correction of Tajima's D. More... | |
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 | 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... | |
double | tajima_d_pool (DiversityPoolSettings const &settings, double theta_pi, double theta_watterson, size_t poolsize, double window_avg_denom, size_t empirical_min_read_depth) |
Compute the pool-sequencing corrected version of Tajima's D according to Kofler et al. More... | |
template<class ForwardIterator > | |
double | tajima_d_pool (DiversityPoolSettings const &settings, double theta_pi, double theta_watterson, size_t poolsize, ForwardIterator begin, ForwardIterator end, bool only_passing_samples=true) |
Compute the pool-sequencing corrected version of Tajima's D according to Kofler et al. More... | |
template<class ForwardIterator > | |
double | tajima_d_pool (DiversityPoolSettings const &settings, size_t poolsize, ForwardIterator begin, ForwardIterator end, bool only_passing_samples=true) |
Compute the pool-sequencing corrected version of Tajima's D according to Kofler et al. More... | |
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... | |
template<class ForwardIterator > | |
double | theta_pi (ForwardIterator begin, ForwardIterator end, bool with_bessel=true, bool only_passing_samples=true) |
Compute classic theta pi, that is, the sum of heterozygosities. More... | |
template<class ForwardIterator > | |
double | theta_pi_pool (DiversityPoolSettings const &settings, size_t poolsize, ForwardIterator begin, ForwardIterator end, bool only_passing_samples=true) |
Compute theta pi with pool-sequencing correction according to Kofler et al, that is, the sum of heterozygosities divided by the correction denominator. More... | |
double | theta_pi_pool (DiversityPoolSettings const &settings, size_t poolsize, SampleCounts const &sample) |
Compute theta pi with pool-sequencing correction according to Kofler et al, for a single SampleCounts. 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... | |
template<class ForwardIterator > | |
double | theta_pi_within_pool (size_t poolsize, ForwardIterator begin, ForwardIterator end, bool only_passing_samples=true) |
Compute classic theta pi (within a population), that is, the sum of heterozygosities including Bessel's correction for total nucleotide sum at each position, and Bessel's correction for the pool size. More... | |
template<class ForwardIterator > | |
double | theta_watterson_pool (DiversityPoolSettings const &settings, size_t poolsize, ForwardIterator begin, ForwardIterator end, bool only_passing_samples=true) |
Compute theta watterson with pool-sequencing correction according to Kofler et al. More... | |
double | theta_watterson_pool (DiversityPoolSettings const &settings, size_t poolsize, SampleCounts const &sample) |
Compute theta watterson with pool-sequencing correction according to Kofler et al, for a single SampleCounts sample. 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... | |