libsequence  1.9.5
msstats.cc
1 /*
2  msstats - read data from ms via stdin, calculate common summary statistics
3 
4  Copyright (C) 2002 Kevin Thornton
5 
6  This program 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 2, or (at your option)
9  any later version.
10 
11  This program 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 this program; if not, write to the Free Software Foundation,
18  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 
20 */
21 
22 #include <iostream>
23 #include <vector>
24 #include <Sequence/SimParams.hpp>
25 #include <Sequence/SimData.hpp>
26 #include <Sequence/PolySIM.hpp>
27 #include <cstdio>
28 
29 using namespace std;
30 using namespace Sequence;
31 
32 int main(int argc, char *argv[])
33 {
34  SimParams p;
35  cin >> p;
36  SimData d;
37  std::ios_base::sync_with_stdio(true);
38 
39  int rv;
40  while( (rv = d.fromfile(stdin)) != EOF )
41  {
42  PolySIM P(&d);
43  cout <<P.NumPoly() << '\t'
44  << P.ThetaW() << '\t'
45  << P.ThetaPi() << '\t'
46  << P.ThetaH() << '\t'
47  << P.TajimasD() << '\t'
48  << P.FuLiD() << '\t'
49  << P.FuLiF() << '\t'
50  << P.FuLiDStar() << '\t'
51  << P.FuLiFStar() << endl;
52  }
53 }
Sequence::SimParams reads in the parameters of Dick Hudon&#39;s coalescent simulation program...
Parameters for Hudson&#39;s simulation program.
Definition: SimParams.hpp:48
STL namespace.
The namespace in which this library resides.
declaration of Sequence::PolySIM, a class to analyze coalescent simulation data
Declaration of Sequence::SimData, a class representing polymorphism data from coalescent simulations ...
Data from coalescent simulations.
Analysis of coalescent simulation data.