Egglib 2.1.11
C++ library reference manual
Ms.hpp
1 /*
2  Copyright 2008,2009,2011 Stéphane De Mita and Mathieu Siol
3 
4  This file is part of the EggLib library.
5 
6  EggLib is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  EggLib is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with EggLib. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef EGGLIB_GMS_HPP
21 #define EGGLIB_GMS_HPP
22 
23 #include "DataMatrix.hpp"
24 #include <string>
25 #include <istream>
26 
27 namespace egglib {
28 
49  class Ms {
50 
51  public:
52 
65  static DataMatrix get(std::string, unsigned int ns, bool separated=false);
66 
67 
85  static DataMatrix get(std::istream& stream, unsigned int ns, bool separated=false);
86 
87 
98  static std::string format(DataMatrix& dataMatrix, bool separated=false);
99 
100 
124  static void format(std::ostream& stream, DataMatrix& dataMatrix, bool separated=false);
125 
126 
137  static double tMRCA();
138 
139 
152  static double prob();
153 
154 
167  static std::string trees();
168 
169 
170  private:
171  // Line parser (the last \n is extracted and discarded - no error upon EOF)
172  std::string next_line(std::istream& stream);
173 
175  static double _tMRCA;
176 
178  static double _prob;
179 
181  static std::string _trees;
182 
183 
185  Ms() { }
186 
188  ~Ms() { }
189 
191  Ms(const Ms&) { }
192 
194  Ms& operator=(const Ms&) { return *this; }
195 
196  };
197 }
198 
199 #endif
Data table.
Definition: DataMatrix.hpp:41
ms-like sequence format parser
Definition: Ms.hpp:49
static double prob()
Returns the last "prob" read by any Ms instance.
Definition: Ms.cpp:285
static double tMRCA()
Returns the last tMRCA read by any Ms instance.
Definition: Ms.cpp:281
Definition: ABC.cpp:37
static std::string trees()
Returns the tree string found in the last simulation read by any Ms instance.
Definition: Ms.cpp:289
static std::string format(DataMatrix &dataMatrix, bool separated=false)
Exports a sequence alignment.
Definition: Ms.cpp:215

Hosted by 
Get EggLib at SourceForge.net. Fast, secure and Free Open Source software downloads