libsequence  1.9.5
VariantMatrixFixture.hpp
1 #ifndef LIBSEQUENCE_TESTS_VARIANTMATRIXFIXTURE_HPP
2 #define LIBSEQUENCE_TESTS_VARIANTMATRIXFIXTURE_HPP
3 
4 #include <Sequence/VariantMatrix.hpp>
5 #include <Sequence/AlleleCountMatrix.hpp>
6 
7 struct dataset
8 {
9  using data_type = decltype(Sequence::VariantMatrix::data);
10  using positions_type = decltype(Sequence::VariantMatrix::positions);
13  dataset()
14  : m{ data_type{ 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0,
15  1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0 },
16  positions_type{ 0.1, 0.2, 0.3 } },
17  c{ m }
18  {
19  }
20 };
21 
22 struct invariantdataset
23 {
24  using data_type = decltype(Sequence::VariantMatrix::data);
25  using positions_type = decltype(Sequence::VariantMatrix::positions);
26  Sequence::VariantMatrix empty, invariant;
27  Sequence::AlleleCountMatrix empty_counts, invariant_counts;
28  invariantdataset()
29  : empty{ data_type{}, positions_type{} },
30  invariant{ data_type{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
31  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
32  positions_type{ 0.1, 0.2, 0.3 } },
33  empty_counts(empty), invariant_counts(invariant)
34  {
35  }
36 };
37 
38 #endif
std::vector< double > positions
Position of sites.
Matrix representation of variation data.
std::vector< std::int8_t > data
Data stored in matrix form with rows as sites.
Matrix representation of allele counts in a VariantMatrix To be constructed.