libsequence  1.9.5
classics.hpp
Go to the documentation of this file.
1 #ifndef SEQUENCE_SUMMSTATS_CLASSICS_HPP__
4 #define SEQUENCE_SUMMSTATS_CLASSICS_HPP__
5 
6 #include <Sequence/VariantMatrix.hpp>
7 #include <Sequence/AlleleCountMatrix.hpp>
8 
9 #include "thetapi.hpp"
10 #include "thetaw.hpp"
11 #include "thetah.hpp"
12 #include "thetal.hpp"
13 #include "nvariablesites.hpp"
14 #include "allele_counts.hpp"
15 
16 namespace Sequence
17 {
30  double tajd(const AlleleCountMatrix& ac);
31 
47  double hprime(const AlleleCountMatrix& ac, const std::int8_t refstate);
48 
64  double hprime(const AlleleCountMatrix& m,
65  const std::vector<std::int8_t>& refstates);
66 
82  double faywuh(const AlleleCountMatrix& ac, const std::int8_t refstate);
83 
99  double faywuh(const AlleleCountMatrix& ac,
100  const std::vector<std::int8_t>& refstates);
101 
127  std::vector<std::int32_t> difference_matrix(const VariantMatrix& m);
128 
138  std::vector<std::int32_t> is_different_matrix(const VariantMatrix& m);
139 
158  std::vector<std::int32_t> label_haplotypes(const VariantMatrix& m);
159 
177  std::int32_t number_of_haplotypes(const VariantMatrix& m);
178 
198  double haplotype_diversity(const VariantMatrix& m);
199 
211  std::int32_t rmin(const VariantMatrix& m);
212 } // namespace Sequence
213 
214 #endif
double hprime(const AlleleCountMatrix &ac, const std::int8_t refstate)
Definition: hprime.cc:45
std::int32_t number_of_haplotypes(const VariantMatrix &m)
Calculate the number of haplotypes in a sample.
Watterson&#39;s theta.
double tajd(const AlleleCountMatrix &ac)
Tajima&#39;s D.
Definition: tajd.cc:9
The namespace in which this library resides.
Fay and Wu&#39;s .
Zeng et al. .
Calculate total numbers of polymorphisms.
std::vector< std::int32_t > label_haplotypes(const VariantMatrix &m)
Assign a unique label to each haplotype.
double faywuh(const AlleleCountMatrix &ac, const std::int8_t refstate)
Fay and Wu&#39;s H.
Definition: faywuh.cc:8
Count alleles at variable sites.
std::int32_t rmin(const VariantMatrix &m)
Definition: rmin.cc:11
std::vector< std::int32_t > is_different_matrix(const VariantMatrix &m)
double haplotype_diversity(const VariantMatrix &m)
Calculate the haplotype diversity of a sample.
std::vector< std::int32_t > difference_matrix(const VariantMatrix &m)
Calculate number of differences between all samples.