libsequence  1.9.5
allele_counts.hpp
Go to the documentation of this file.
1 #ifndef SEQUENCE_SUMMSTATS_ALLELE_COUNTS_HPP__
4 #define SEQUENCE_SUMMSTATS_ALLELE_COUNTS_HPP__
5 
6 #include <vector>
7 #include <utility>
8 #include <cstdint>
9 #include <Sequence/AlleleCountMatrix.hpp>
10 
11 namespace Sequence
12 {
13  struct AlleleCounts
16  {
18  int nstates;
20  int nmissing;
21  };
22 
27  std::vector<AlleleCounts> allele_counts(const AlleleCountMatrix& m);
28 
34  std::vector<AlleleCounts>
36  const std::int8_t refstate);
37 
43  std::vector<AlleleCounts>
45  const std::vector<std::int8_t>& refstates);
46 } // namespace Sequence
47 #endif
std::vector< AlleleCounts > allele_counts(const AlleleCountMatrix &m)
Count number of alleles at each site.
int nstates
Number of non-missing states.
The namespace in which this library resides.
int nmissing
Number of samples with missing states.
Matrix representation of allele counts in a VariantMatrix To be constructed.
std::vector< AlleleCounts > non_reference_allele_counts(const AlleleCountMatrix &m, const std::int8_t refstate)
Count number of non-reference alleles at each site.