ʻOhana
Population structure, admixture history, and selection using learning methods.
jade.ped2dgm.hpp
1 /* -------------------------------------------------------------------------
2  Ohana
3  Copyright (c) 2015-2020 Jade Cheng (\___/)
4  Jade Cheng <info@jade-cheng.com> (='.'=)
5  ------------------------------------------------------------------------- */
6 
7 #ifndef JADE_PED2DGM_HPP__
8 #define JADE_PED2DGM_HPP__
9 
10 #include "jade.ped_reader.hpp"
11 
12 namespace jade
13 {
14  ///
15  /// A template for a class that converts PED-formatted data to discrete
16  /// genotype matrices.
17  ///
18  template <typename TValue>
20  {
21  public:
22  /// The value type.
23  typedef TValue value_type;
24 
25  /// The PED reader type.
27 
28  ///
29  /// Executes the program through the specified streams.
30  ///
31  static void execute(
32  std::istream & in, ///< The input stream.
33  std::ostream & out) ///< The output stream.
34  {
35  reader_type reader (in);
36  reader.write(out);
37  }
38  };
39 }
40 
41 #endif // JADE_PED2DGM_HPP__
jade::basic_ped2dgm
A template for a class that converts PED-formatted data to discrete genotype matrices.
Definition: jade.ped2dgm.hpp:20
jade::basic_ped_reader::write
void write(std::ostream &out) const
Writes the PED data to the specified output stream.
Definition: jade.ped_reader.hpp:119
jade::basic_ped2dgm::execute
static void execute(std::istream &in, std::ostream &out)
Executes the program through the specified streams.
Definition: jade.ped2dgm.hpp:31
jade::basic_ped_reader
A template for a class that reads PED data.
Definition: jade.ped_reader.hpp:19
jade::basic_ped2dgm::reader_type
jade::basic_ped_reader< value_type > reader_type
The PED reader type.
Definition: jade.ped2dgm.hpp:26
jade::basic_ped2dgm::value_type
TValue value_type
The value type.
Definition: jade.ped2dgm.hpp:23