ʻOhana
Population structure, admixture history, and selection using learning methods.
jade.bgl2lgm.hpp
1 /* -------------------------------------------------------------------------
2  Ohana
3  Copyright (c) 2015-2020 Jade Cheng (\___/)
4  Jade Cheng <info@jade-cheng.com> (='.'=)
5  ------------------------------------------------------------------------- */
6 
7 #ifndef JADE_BGL2LGM_HPP__
8 #define JADE_BGL2LGM_HPP__
9 
10 #include "jade.bgl_reader.hpp"
11 
12 namespace jade
13 {
14  ///
15  /// A template for a class that converts BEAGLE-formatted data to likelihood
16  /// genotype matrices.
17  ///
18  template <typename TValue>
20  {
21  public:
22  /// The value type.
23  typedef TValue value_type;
24 
25  /// The 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_BGL2LGM_HPP__
jade::basic_bgl2lgm::reader_type
jade::basic_bgl_reader< value_type > reader_type
The reader type.
Definition: jade.bgl2lgm.hpp:26
jade::basic_bgl2lgm::execute
static void execute(std::istream &in, std::ostream &out)
Executes the program through the specified streams.
Definition: jade.bgl2lgm.hpp:31
jade::basic_bgl_reader::write
void write(std::ostream &out) const
Writes the BEAGLE data to the specified output stream as a likelihood genotype matrix.
Definition: jade.bgl_reader.hpp:114
jade::basic_bgl2lgm
A template for a class that converts BEAGLE-formatted data to likelihood genotype matrices.
Definition: jade.bgl2lgm.hpp:20
jade::basic_bgl2lgm::value_type
TValue value_type
The value type.
Definition: jade.bgl2lgm.hpp:23
jade::basic_bgl_reader
A template for a class that reads BEAGLE data and is capable of writing it to a stream as a likelihoo...
Definition: jade.bgl_reader.hpp:20