annotate egglib/egglib-2.1.5/include/egglib-cpp/FStatistics.hpp @ 11:15b23cdde685 draft

planemo upload commit 305985afd3b7c3d47f531149c2f1a279af2d12aa-dirty
author dereeper
date Fri, 20 Apr 2018 09:04:25 -0400
parents 420b57c3c185
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
1 /*
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
2 Copyright 2009 Stéphane De Mita, Mathieu Siol
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
3
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
4 This file is part of the EggLib library.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
5
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
6 EggLib is free software: you can redistribute it and/or modify
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
8 the Free Software Foundation, either version 3 of the License, or
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
9 (at your option) any later version.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
10
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
11 EggLib is distributed in the hope that it will be useful,
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
14 GNU General Public License for more details.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
15
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
17 along with EggLib. If not, see <http://www.gnu.org/licenses/>.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
18 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
19
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
20 #ifndef EGGLIB_FSTATISTICS_HPP
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
21 #define EGGLIB_FSTATISTICS_HPP
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
22
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
23
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
24
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
25 namespace egglib {
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
26
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
27
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
28 /** \brief Computes Fis, Fst and Fit from diploid data
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
29 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
30 * The class requires loading data. Data are loaded by individual
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
31 * (two genotypes per individual). The analyses are cached: they are
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
32 * performed upon the first call to statistics accessors. The cache
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
33 * is emptied whenever a datum is loaded.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
34 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
35 * The computations are performed after Weir and Cockerham. The
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
36 * statistics F, theta and f are generalized for multiple alleles.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
37 * To allow computation of multi-locus statistics, variance
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
38 * components are also available. The three components of the
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
39 * variance are Vpopulation (between-population), Vindividual
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
40 * (within-population, between-individual) and Vallele (within-
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
41 * individual). The formulas to compute the F-statistics are as
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
42 * follows:
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
43 * - 1-F = Vallele/(Vpopulation+Vindividual+Vallele)
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
44 * - theta = Vpopulation/(Vpopulation+Vindividual+Vallele)
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
45 * - 1-f = Vallele/(Vindividual+Vallele).
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
46 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
47 * \ingroup polymorphism
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
48 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
49 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
50 class FStatistics {
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
51
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
52 public:
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
53
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
54 /** \brief Constructor
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
55 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
56 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
57 FStatistics();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
58
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
59
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
60 /** \brief Destructor
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
61 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
62 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
63 virtual ~FStatistics();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
64
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
65
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
66 /** \brief Reserve sufficient memory for a given number of
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
67 * individuals.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
68 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
69 * This method makes the load function faster by allocating
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
70 * all required memory at once.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
71 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
72 * \param numberOfIndividuals a strictly positive integer.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
73 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
74 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
75 void reserve(unsigned int numberOfIndividuals);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
76
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
77
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
78 /** \brief Loads the data for one individual
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
79 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
80 * \param genotype1 an integer giving the first allele.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
81 * \param genotype2 an integer giving the second allele.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
82 * \param populationLabel an integer indication belonging to
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
83 * a population.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
84 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
85 * Genotypes and population labels are not required to be
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
86 * consecutive (both are labels, not indices). They are
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
87 * internally mapped to indices (the mapping can be obtained
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
88 * by accessors populationLabel and allele).
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
89 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
90 * All genotypes are considered to be valid (no missing data).
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
91 * If statistics were computed previous to call to this
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
92 * function, all data will be erase.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
93 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
94 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
95 void loadIndividual(unsigned int genotype1,
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
96 unsigned int genotype2, unsigned int populationLabel);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
97
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
98
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
99 /** \brief Label of a population
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
100 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
101 * The index corresponds to the local mapping of populations
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
102 * regardless of the ranking of population labels. (No out
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
103 * of bound checking.)
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
104 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
105 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
106 unsigned int populationLabel(unsigned int populationIndex);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
107
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
108
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
109 /** \brief Value of an allele
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
110 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
111 * The index corresponds to the local mapping of alleles
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
112 * regardless of the ranking of allele values. (No out of
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
113 * bound checking.)
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
114 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
115 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
116 unsigned int alleleValue(unsigned int alleleIndex);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
117
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
118
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
119 /// First allele of a given individual (no checking)
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
120 unsigned int firstAllele(unsigned int individualIndex) const;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
121
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
122 /// Second allele of a given individual (no checking)
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
123 unsigned int secondAllele(unsigned int individualIndex) const;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
124
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
125 /// Population label of a given individual (no checking)
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
126 unsigned int individualLabel(unsigned int individualIndex) const;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
127
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
128
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
129 /** \brief Number of alleles
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
130 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
131 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
132 unsigned int numberOfAlleles();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
133
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
134
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
135 /** \brief Number of populations
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
136 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
137 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
138 unsigned int numberOfPopulations();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
139
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
140
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
141 /** \brief Number of loaded genotypes
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
142 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
143 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
144 unsigned int numberOfGenotypes() const;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
145
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
146
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
147 /** \brief Absolute total allele frequency
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
148 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
149 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
150 unsigned int alleleFrequencyTotal(unsigned int alleleIndex);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
151
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
152
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
153 /** \brief Absolute allele frequency in a population
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
154 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
155 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
156 unsigned int alleleFrequencyPerPopulation(unsigned int populationIndex, unsigned int alleleIndex);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
157
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
158
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
159 /** \brief Absolute genotype frequency
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
160 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
161 * Note that allele AB is considered different to BA (this
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
162 * means that values can be accessed both sides of the
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
163 * diagonal.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
164 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
165 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
166 unsigned int genotypeFrequencyTotal(unsigned int alleleIndex1, unsigned int alleleIndex2);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
167
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
168
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
169 /** \brief Absolute genotype frequency in a population
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
170 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
171 * Note that allele AB is considered different to BA (this
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
172 * means that values can be accessed both sides of the
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
173 * diagonal.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
174 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
175 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
176 unsigned int genotypeFrequencyPerPopulation(unsigned int populationIndex, unsigned int alleleIndex1, unsigned int alleleIndex2);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
177
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
178
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
179 /** \brief Sample size of a population
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
180 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
181 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
182 unsigned int populationFrequency(unsigned int populationIndex);
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
183
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
184
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
185 /** \brief Weir-Cockerham F-statistic
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
186 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
187 * Note: equivalent to Fit.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
188 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
189 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
190 double F();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
191
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
192
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
193 /** \brief Weir-Cockerham theta-statistic
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
194 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
195 * Note: equivalent to Fst.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
196 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
197 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
198 double theta();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
199
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
200
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
201 /** \brief Weir-Cockerham f-statistic
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
202 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
203 * Note: equivalent to Fis.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
204 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
205 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
206 double f();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
207
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
208
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
209 /** \brief Between-population component of variance
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
210 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
211 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
212 double Vpopulation();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
213
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
214
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
215 /** \brief Within-population, between-individual component of variance
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
216 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
217 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
218 double Vindividual();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
219
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
220
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
221 /** \brief Within-individual component of variance
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
222 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
223 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
224 double Vallele();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
225
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
226
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
227 protected:
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
228
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
229 bool d_flag;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
230 void d_init();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
231 void d_clear();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
232 unsigned int d_reserved;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
233 unsigned int d_numberOfGenotypes;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
234 unsigned int *d_genotypes;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
235 unsigned int *d_populationLabels;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
236
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
237 bool s_flag;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
238 void s_init();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
239 void s_clear();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
240 void s_compute();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
241 void processPopulations();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
242 void processAlleles();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
243 unsigned int getPopulationIndex(unsigned int) const;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
244 unsigned int getAlleleIndex(unsigned int) const;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
245 unsigned int s_numberOfAlleles;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
246 unsigned int *s_alleleValueMapping;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
247 unsigned int s_numberOfPopulations;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
248 unsigned int *s_populationLabelMapping;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
249 unsigned int *s_populationFrequencies;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
250 unsigned int *s_alleleFrequenciesTotal;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
251 unsigned int **s_alleleFrequenciesPerPopulation;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
252 unsigned int **s_genotypeFrequenciesTotal;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
253 unsigned int ***s_genotypeFrequenciesPerPopulation;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
254
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
255 bool w_flag;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
256 void w_init();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
257 void w_clear();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
258 void w_compute();
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
259 double w_F;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
260 double w_T;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
261 double w_f;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
262 double *w_a;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
263 double *w_b;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
264 double *w_c;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
265 double w_nbar;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
266 double w_nc;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
267 double *w_pbar;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
268 double *w_ssquare;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
269 double *w_hbar;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
270 double w_sum_a;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
271 double w_sum_b;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
272 double w_sum_c;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
273 double w_sum_abc;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
274 double w_sum_bc;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
275
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
276
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
277 private:
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
278
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
279 FStatistics(const FStatistics& source) { }
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
280
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
281 FStatistics& operator=(const FStatistics& source) {
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
282 return *this;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
283 }
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
284
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
285 };
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
286 }
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
287
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
288 #endif