2 #include <Sequence/summstats/ld.hpp> 4 #include <Sequence/VariantMatrix.hpp> 5 #include <Sequence/AlleleCountMatrix.hpp> 6 #include <Sequence/VariantMatrixViews.hpp> 19 std::vector<std::size_t> biallelic_site_indexes;
20 for (std::size_t i = 0; i < ac.size(); ++i)
22 if (ac[i].nstates == 2)
24 biallelic_site_indexes.push_back(i);
27 if (biallelic_site_indexes.size() < 2)
34 for (std::size_t a = x + 1; a < biallelic_site_indexes.size(); ++a)
36 for (std::size_t b = (!flag) ? x : a - 1; b < a; ++b)
41 auto tl = two_locus_haplotype_counts(m, a, b,
true);
std::vector< AlleleCounts > allele_counts(const AlleleCountMatrix &m)
Count number of alleles at each site.
The namespace in which this library resides.
std::size_t nsites
Number of sites in data set.
Count alleles at variable sites.
std::int32_t rmin(const VariantMatrix &m)
Matrix representation of variation data.
Matrix representation of allele counts in a VariantMatrix To be constructed.