libsequence  1.9.5
PolySIM.hpp
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2003-2009 Kevin Thornton, krthornt[]@[]uci.edu
4 
5 Remove the brackets to email me.
6 
7 This file is part of libsequence.
8 
9 libsequence is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 libsequence is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 long with libsequence. If not, see <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #ifndef _POLYSIM_H_
25 #define _POLYSIM_H_
26 
41 #include <Sequence/PolySNP.hpp>
42 
43 namespace Sequence
44  {
45  class SimData;
46  class __attribute__ ((deprecated)) PolySIM : public PolySNP
47  {
48  private:
49  //functions for Hudson's Partition Test
50  int poly (int *subslist, const int & ss,
51  const int & subsize, const int & subss, int *seq) const;
52  int nextsample (int *subslist, const int & subsize, const int & nsam, int seq) const;
53  protected:
54  void WallStats(void) const;
55  public:
56  explicit PolySIM (const Sequence::SimData * data);
57  virtual ~ PolySIM(void);
58  //estimators of 4Nu
59  double ThetaPi (void) const;
60  double ThetaW (void) const;
61  double ThetaH (void) const;
62  double ThetaL (void) const;
63 
64  //calculate various numbers related to polymorphism
65  unsigned NumMutations (void) const;
66  unsigned NumSingletons (void) const;
67  unsigned NumExternalMutations (void) const;
68  //summary statistics of the site frequency spectrum
69  double TajimasD (void) const;
70  double Hprime (const bool & likeThorntonAndolfatto = false) const;
71  double Dnominator (void) const;
72  double FuLiD (void) const;
73  double FuLiF (void) const;
74  double FuLiDStar (void) const;
75  double FuLiFStar (void) const;
76  double WallsB(void) const;
77  unsigned WallsBprime(void) const;
78  double WallsQ(void) const;
79  //Hudson's Haplotype Partition Test
80  int HudsonsHaplotypeTest (const int & subsize,const int & subss) const;
81 
82  //recombination
83  unsigned Minrec (void) const;
84  };
85 }
86 #endif
The namespace in which this library resides.
declaration of Sequence::PolySNP, a class to analyze SNP data
class __attribute__((deprecated)) FST
Functor to count the number of states, excluding gaps and missing data, in a range of characters...
Definition: FST.hpp:41
Data from coalescent simulations.