Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
ttquanti.h
Go to the documentation of this file.
1
30#ifndef TTQUANTI_H
31#define TTQUANTI_H
32
33#include <cmath>
34#include <vector>
35#include "ttrait_with_map.h"
36#include "filehandler.h"
37#include "stathandler.h"
38#include "metapop.h"
39#include "datatable.h"
40#ifdef HAS_GSL
41#include <gsl/gsl_vector.h>
42#include <gsl/gsl_matrix.h>
43#include <gsl/gsl_eigen.h>
44#endif
45
46class TTQuantiSH;
47class TTQuantiFH;
49class TProtoQuanti;
50
51// ------------------------------------------------------------------------------
55// ------------------------------------------------------------------------------
56class TTQuanti: public TTrait {
57
58public:
59
61 { }
62
64 { }
65
66 virtual ~TTQuanti () {reset();}
67
68 //implements TTrait:
69 virtual void init ();
70 virtual void init_sequence ();
71 virtual void reset ();
72 virtual void inherit (TTrait* mother, TTrait* father);
73 virtual void mutate ();
74 virtual void* set_trait (void* value) {return value;}
75 virtual void set_sequence (void** seq);
76 virtual void set_value ();
77 virtual void* getValue () const {return _phenotypes;}
78 virtual trait_t get_type () const {return QUANT;}
79 virtual void** get_sequence () const {return (void**)_sequence;}
80 virtual double get_allele_value (int loc, int all);
81 virtual void set_allele_value (unsigned int locus, unsigned int allele, double value);
82 virtual void show_up ();
83 virtual TTQuanti* clone () {return new TTQuanti(*this);}
84 virtual TTQuanti& operator= (const TTrait& T);
85 virtual bool operator== (const TTrait& T);
86 virtual bool operator!= (const TTrait& T);
87
88 //implements StorableComponent:
89 virtual void store_data ( BinaryStorageBuffer* saver );
90 virtual bool retrieve_data ( BinaryStorageBuffer* reader );
91
92 //accessors:
93 void set_proto (TProtoQuanti* proto) {_myProto = proto;}
94
95 double get_additive_genotype (unsigned int trait);
96 double get_full_genotype (unsigned int trait);
97 void set_allele (int locus, int allele, double value) {_sequence[allele][locus] = value;}
98 void set_phenotype (unsigned int trait, double value);
99
100private:
101
102 double **_sequence;
103 double *_phenotypes;
104
106};
107
108// ------------------------------------------------------------------------------
112// ------------------------------------------------------------------------------
114
115public:
116
117 TProtoQuanti ();
118 TProtoQuanti (const TProtoQuanti& T);
119 virtual ~TProtoQuanti ();
120
121 unsigned int get_nb_traits() {return _nb_traits;}
122 unsigned int get_nb_locus() {return _nb_locus;}
123 unsigned int get_seq_length () {return _seq_length;}
124 vector<double> get_env_var () {return _eVariance;}
125 vector<double> get_heritability () {return _h2;}
126 unsigned int get_h2_setTime () {return _h2_setTime;}
127 bool get_h2_isBroad () {return _h2_isBroad;}
128 double get_trait_var (unsigned int trait) {return _mutation_matrix->get(trait, trait);}
130 unsigned int get_allele_model () {return _allele_model;}
131 double ** get_allele_values () const {return _allele_value;}
132 double get_init_value (unsigned int i) {return _init_value[i]; }
134
135 void set_eVarianceSD (unsigned int trait, double SD);
136 void set_init_values (const double *values, unsigned int nval);
137 void set_trait_value_func_ptr (bool withVe);
138 double set_trait_value_VE (const TTQuanti* ind, const unsigned int trait);
139 double set_trait_value_noVE (const TTQuanti* ind, const unsigned int trait);
140 double set_genotype_value_additive (const double** sequ, const unsigned int trait);
141 // dominance
142 double set_genotype_value_dominance (const double** sequ, const unsigned int trait);
143 double get_genotype (const double a1, const double a2, const unsigned int locus, const unsigned int trait);
144 double get_genotype_dominance_h (double a1, double a2, double h);
145 double get_genotype_dominance_k (double a1, double a2, double k);
146 unsigned int get_dominance_model () {return _dominance_model;}
147 double get_dominance (unsigned int locus, unsigned int trait)
148 {return _dominance_effects.get(trait, locus); }
150
151
152 bool setMutationParameters ();
154
159
160
161 double* getMutationEffectMultivariateGaussian (unsigned int loc);
162 double* getMutationEffectBivariateGaussian (unsigned int loc);
163 double* getMutationEffectUnivariateGaussian (unsigned int loc);
164 double* getMutationEffectUnivariateDiallelic (unsigned int loc);
165 double* getMutationEffectBivariateDiallelic (unsigned int loc);
166 void inherit (sex_t SEX, double* seq, const double** parent);
167 void inherit_free (sex_t SEX, double* seq, const double** parent);
168 void inherit_low (sex_t SEX, double* seq, const double** parent);
169 void mutate (TTQuanti* ind);
170 void mutate_nill (TTQuanti* ind);
171 void mutate_noHC (TTQuanti* ind);
172 void mutate_HC (TTQuanti* ind);
173 void mutate_diallelic_HC (TTQuanti* ind);
174
175 //implements TraitPrototype:
176 virtual void reset () {TTProtoWithMap::reset();}
177 virtual TTQuanti* hatch ();
178 virtual TProtoQuanti* clone () {return new TProtoQuanti(*this);}
179 virtual trait_t get_type () const {return QUANT;}
180
181 //implementation of SimComponent:
182 virtual bool setParameters();
183 virtual void loadFileServices ( FileServices* loader );
184 virtual void loadStatServices ( StatServices* loader );
185 virtual bool resetParameterFromSource (std::string param, SimComponent* cmpt) {return false;}
186
187
188 //implementation of StorableComponent:
189 virtual void store_data ( BinaryStorageBuffer* saver )
190 {saver->store(&_seq_length,sizeof(int));}
191
192 virtual bool retrieve_data ( BinaryStorageBuffer* reader )
193 {reader->read(&_seq_length,sizeof(int));return true;}
194
195private:
196
198 unsigned int _nb_locus;
200 unsigned int _nb_traits;
202 unsigned int _seq_length;
203 unsigned int _allele_model;
204 double **_allele_value;// num locus x 2
205 double *_init_value; // num traits
206 double *_phenotypes; // num traits
207
208 //mutations:
211 gsl_matrix *_evect;
212 gsl_vector *_eval;
213 gsl_vector *_effects_multivar;
214 gsl_vector *_ws;
218 double _effects_bivar[2];
219 unsigned int _doInitMutation;
220 unsigned int _dominance_model;
224
225 //recombination:
229
230 vector<double> _eVariance;
231 vector<double> _h2;
232 unsigned int _h2_setTime;
234
235 void (TProtoQuanti::* _inherit_fun_ptr) (sex_t, double*, const double**);
237 double* (TProtoQuanti::* _getMutationValues) (unsigned int);
238 double (TProtoQuanti::* _getGenotypeWithDominance) (double, double, double);
239 double (TProtoQuanti::* _set_trait_value_func_ptr) (const TTQuanti*, const unsigned int);
240 double (TProtoQuanti::* _set_genotype_func_ptr) (const double**, const unsigned int);
241
242 friend class TTQuanti;
243
248};
249// ------------------------------------------------------------------------------
253// ------------------------------------------------------------------------------
254
255typedef double ALLELE; //for the QUANTINEMO hack:
256
257class TTQuantiSH : public TraitStatHandler<TProtoQuanti, TTQuantiSH> {
258
259 double *_meanP, *_meanG, *_Va, *_Vg, *_Vb, *_Vp, *_covar,*_eigval,**_eigvect;
260 double **_pmeanP, **_pmeanG, **_pVa, **_pVp, **_pcovar, **_peigval, **_peigvect;
261
263 bool _eVar;
264
265 gsl_matrix *_G, *_evec;
266 gsl_vector *_eval;
267 gsl_eigen_symmv_workspace *_ws;
268
271
272public:
273
276 _meanP(0), _meanG(0), _Va(0), _Vg(0), _Vb(0), _Vp(0), _covar(0), _eigval(0), _eigvect(0),
277 _pmeanP(0), _pmeanG(0), _pVa(0), _pVp(0), _pcovar(0), _peigval(0), _peigvect(0),
278 _nb_locus(0), _nb_trait(0),_patchNbr(0), _eVar(0),_G(0),_evec(0),_eval(0),_ws(0),
279 _table_set_gen(999999), _table_set_age(999999), _table_set_repl(999999)
280 {}
281
282 virtual ~TTQuantiSH() {resetPtrs();}
283
284 void resetPtrs();
285
286 virtual void init ( );
287
288 virtual bool setStatRecorders (std::string& token);
289 void addQuanti (age_t AGE);
290 void addEigen (age_t AGE);
291 void addEigenValues (age_t AGE);
292 void addEigenVect1 (age_t AGE);
293 void addQuantiPerPatch (age_t AGE);
294 void addAvgPerPatch (age_t AGE);
295 void addVarPerPatch (age_t AGE);
296 void addCovarPerPatch (age_t AGE);
297 void addEigenPerPatch (age_t AGE);
298 void addEigenValuesPerPatch (age_t AGE);
299 void addEigenVect1PerPatch (age_t AGE);
301 void addSkewPerPatch(age_t AGE);
302
303 void setDataTables (age_t AGE);
306 void setStats (age_t AGE);
307 double getMeanPhenot (unsigned int i) {return _meanP[i];}
308 double getVa (unsigned int i) {return _Va[i];}
309 double getVg (unsigned int i) {return _Vg[i];}
310 double getVb (unsigned int i) {return _Vb[i];}
311 double getVp (unsigned int i) {return _Vp[i];}
312 double getQst (unsigned int i) {return _Vb[i]/(_Vb[i]+2*_Va[i]);}
313 double getCovar (unsigned int i) {return _covar[i];}
314 double getEigenValue (unsigned int i) {return _eigval[i];}
315 double getEigenVectorElt (unsigned int t1, unsigned int t2) {return _eigvect[t2][t1];}//eigenvectors arranged column-wise
316
317 double getMeanPhenotPerPatch (unsigned int i, unsigned int p) {return _pmeanP[i][p];}
318 double getVaPerPatch (unsigned int i, unsigned int p) {return _pVa[i][p];}
319 double getVpPerPatch (unsigned int i, unsigned int p) {return _pVp[i][p];}
320 double getEigenValuePerPatch (unsigned int i, unsigned int p) {return _peigval[i][p];}
321 double getCovarPerPatch (unsigned int p, unsigned int i) {return _pcovar[p][i];}
322 double getEigenVectorEltPerPatch (unsigned int p, unsigned int v) {return _peigvect[p][v];}
323 double getSkewPerPatch (unsigned int i, unsigned int p);
324 vector<double> getSNPalleleFreqInPatch (Patch* patch);
325 vector<double> getVaWithDominance (Patch* curPop, const age_idx AGE);
326 vector<double> getVaNoDominance (Patch* curPop, const age_idx AGE);
327
328};
329// ------------------------------------------------------------------------------
333// ------------------------------------------------------------------------------
334class TTQuantiFH : public TraitFileHandler<TProtoQuanti> {
335
337
338public:
340 virtual ~TTQuantiFH(){}
341
342 void setOutputOption (string opt);
343
344 virtual void FHwrite ();
345 void write_TABLE ();
346 void print(ofstream& FH, sex_t SEX, age_idx Ax, unsigned int print_gene, bool print_genotype, bool print_additive_genotype);
347 void write_PLINK ();
348 void print_PLINK_PED(ofstream& FH, age_idx Ax, Patch *patch);
349 void print_PLINK_FAM(ofstream& FH, age_idx Ax, Patch *patch);
350
351 virtual void FHread (string& filename);
352};
353// ------------------------------------------------------------------------------
357// ------------------------------------------------------------------------------
358class TTQFreqExtractor : public TraitFileHandler<TProtoQuanti> {
359
360 vector< string > _records;
361
362public:
364
365 void resetTable();
366
367 virtual ~TTQFreqExtractor () {}
368 virtual void FHwrite ();
369 virtual void FHread (string& filename) {}
370};
371
372#endif
373
A class to store any kind of data in a char buffer before unloading it in a binary data file.
Definition: binarystoragebuffer.h:44
void read(void *out, unsigned int nb_bytes)
Definition: binarystoragebuffer.h:162
void store(void *stream, unsigned int nb_bytes)
Definition: binarystoragebuffer.cc:16
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:52
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:430
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
The Service class used to manage the StatHandler objects.
Definition: statservices.h:50
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:49
double get(unsigned int i, unsigned int j)
Accessor to element at row i and column j.
Definition: tmatrix.h:147
TProtoQuanti.
Definition: ttquanti.h:113
vector< double > _eVariance
Definition: ttquanti.h:230
double * getMutationEffectMultivariateGaussian(unsigned int loc)
Definition: ttquanti.cc:927
vector< double > get_env_var()
Definition: ttquanti.h:124
unsigned int _allele_model
Definition: ttquanti.h:203
TMatrix _dominance_sd
Definition: ttquanti.h:221
TMatrix _dominance_effects
Definition: ttquanti.h:222
size_t _sizeofLocusType
Definition: ttquanti.h:228
unsigned int _doInitMutation
Definition: ttquanti.h:219
gsl_vector * _effects_multivar
Definition: ttquanti.h:213
virtual ~TProtoQuanti()
Definition: ttquanti.cc:179
bool setMutationParameters()
Definition: ttquanti.cc:466
void(TProtoQuanti::* _inherit_fun_ptr)(sex_t, double *, const double **)
Definition: ttquanti.h:235
double set_trait_value_VE(const TTQuanti *ind, const unsigned int trait)
Definition: ttquanti.cc:1031
unsigned int _dominance_model
Definition: ttquanti.h:220
double * getMutationEffectUnivariateGaussian(unsigned int loc)
Definition: ttquanti.cc:944
double *(TProtoQuanti::* _getMutationValues)(unsigned int)
Definition: ttquanti.h:237
bool _h2_isBroad
Definition: ttquanti.h:233
TTQuantiFH * _reader
Definition: ttquanti.h:246
bool setDominanceParameters()
Definition: ttquanti.cc:824
gsl_vector * _eval
Definition: ttquanti.h:212
double * getMutationEffectUnivariateDiallelic(unsigned int loc)
Definition: ttquanti.cc:952
double get_mutation_correlation()
Definition: ttquanti.h:129
unsigned int _h2_setTime
Definition: ttquanti.h:232
unsigned int _seq_length
Total number of loci, same as _nb_locus.
Definition: ttquanti.h:202
void mutate_nill(TTQuanti *ind)
Definition: ttquanti.cc:1218
gsl_matrix * _gsl_mutation_matrix
Definition: ttquanti.h:210
double get_dominance(unsigned int locus, unsigned int trait)
Definition: ttquanti.h:147
double * _phenotypes
Definition: ttquanti.h:206
bool _dominance_is_constant
Definition: ttquanti.h:223
double * getMutationEffectBivariateGaussian(unsigned int loc)
Definition: ttquanti.cc:935
void set_trait_value_func_ptr(bool withVe)
Definition: ttquanti.cc:456
vector< double > _h2
Definition: ttquanti.h:231
void inherit(sex_t SEX, double *seq, const double **parent)
Definition: ttquanti.cc:1113
unsigned int get_nb_locus()
Definition: ttquanti.h:122
double get_init_value(unsigned int i)
Definition: ttquanti.h:132
TTQuantiSH * _stats
Definition: ttquanti.h:244
virtual TTQuanti * hatch()
Definition: ttquanti.cc:1293
void set_init_values(const double *values, unsigned int nval)
Definition: ttquanti.cc:1019
void(TProtoQuanti::* _mutation_func_ptr)(TTQuanti *)
Definition: ttquanti.h:236
void set_mutation_matrix_decomposition()
Definition: ttquanti.cc:798
unsigned int get_nb_traits()
Definition: ttquanti.h:121
void inherit_free(sex_t SEX, double *seq, const double **parent)
Definition: ttquanti.cc:1120
double _genomic_mutation_rate
Definition: ttquanti.h:215
double * getMutationEffectBivariateDiallelic(unsigned int loc)
Definition: ttquanti.cc:960
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttquanti.h:192
void mutate_noHC(TTQuanti *ind)
Definition: ttquanti.cc:1225
unsigned int get_allele_model()
Definition: ttquanti.h:130
bool * _all_chooser
Definition: ttquanti.h:226
double(TProtoQuanti::* _getGenotypeWithDominance)(double, double, double)
Definition: ttquanti.h:238
unsigned int _nb_traits
Number of traits.
Definition: ttquanti.h:200
void mutate_HC(TTQuanti *ind)
Definition: ttquanti.cc:1272
double set_genotype_value_dominance(const double **sequ, const unsigned int trait)
Definition: ttquanti.cc:1061
void mutate(TTQuanti *ind)
Definition: ttquanti.cc:1211
unsigned int get_h2_setTime()
Definition: ttquanti.h:126
TMatrix get_dominance_effects()
Definition: ttquanti.h:149
double get_genotype(const double a1, const double a2, const unsigned int locus, const unsigned int trait)
Definition: ttquanti.cc:1106
double set_genotype_value_additive(const double **sequ, const unsigned int trait)
Definition: ttquanti.cc:1045
vector< double > get_heritability()
Definition: ttquanti.h:125
void mutate_diallelic_HC(TTQuanti *ind)
Definition: ttquanti.cc:1248
size_t _locusByteSize
Definition: ttquanti.h:227
double set_trait_value_noVE(const TTQuanti *ind, const unsigned int trait)
Definition: ttquanti.cc:1038
gsl_matrix * _evect
Definition: ttquanti.h:211
void inherit_low(sex_t SEX, double *seq, const double **parent)
Definition: ttquanti.cc:1140
virtual void loadStatServices(StatServices *loader)
Definition: ttquanti.cc:1376
unsigned int get_seq_length()
Definition: ttquanti.h:123
double(TProtoQuanti::* _set_trait_value_func_ptr)(const TTQuanti *, const unsigned int)
Definition: ttquanti.h:239
virtual trait_t get_type() const
Definition: ttquanti.h:179
double get_genotype_dominance_k(double a1, double a2, double k)
Definition: ttquanti.cc:1101
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: ttquanti.h:185
gsl_vector * _ws
Definition: ttquanti.h:214
double get_genotype_dominance_h(double a1, double a2, double h)
Definition: ttquanti.cc:1084
double _effects_bivar[2]
Definition: ttquanti.h:218
virtual void reset()
Definition: ttquanti.h:176
double _mutation_correlation
Definition: ttquanti.h:216
double * _init_value
Definition: ttquanti.h:205
TTQuantiSH * get_stater()
Definition: ttquanti.h:133
void reset_mutation_pointers()
Definition: ttquanti.cc:971
bool setDiallelicMutationModel()
Definition: ttquanti.cc:550
bool setContinuousMutationModel()
Definition: ttquanti.cc:673
TTQuantiFH * _writer
Definition: ttquanti.h:245
virtual bool setParameters()
Definition: ttquanti.cc:193
bool get_h2_isBroad()
Definition: ttquanti.h:127
virtual void loadFileServices(FileServices *loader)
Definition: ttquanti.cc:1304
unsigned int _nb_locus
Total number of loci, for all traits.
Definition: ttquanti.h:198
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttquanti.h:189
TMatrix * _mutation_matrix
Definition: ttquanti.h:209
double * _mutation_sigma
Definition: ttquanti.h:217
unsigned int get_dominance_model()
Definition: ttquanti.h:146
TProtoQuanti()
Definition: ttquanti.cc:60
double(TProtoQuanti::* _set_genotype_func_ptr)(const double **, const unsigned int)
Definition: ttquanti.h:240
void set_eVarianceSD(unsigned int trait, double SD)
Definition: ttquanti.cc:917
virtual TProtoQuanti * clone()
Definition: ttquanti.h:178
double ** get_allele_values() const
Definition: ttquanti.h:131
double ** _allele_value
Definition: ttquanti.h:204
double get_trait_var(unsigned int trait)
Definition: ttquanti.h:128
TTQFreqExtractor * _freqExtractor
Definition: ttquanti.h:247
TTProtoWithMap.
Definition: ttrait_with_map.h:176
virtual void reset()
Definition: ttrait_with_map.cc:611
TTQFreqExtractor.
Definition: ttquanti.h:358
virtual ~TTQFreqExtractor()
Definition: ttquanti.h:367
TTQFreqExtractor(TProtoQuanti *T)
Definition: ttquanti.h:363
vector< string > _records
Definition: ttquanti.h:360
void resetTable()
Definition: ttquanti.cc:3525
virtual void FHread(string &filename)
Definition: ttquanti.h:369
virtual void FHwrite()
Definition: ttquanti.cc:3532
TTQuantiFH.
Definition: ttquanti.h:334
void print(ofstream &FH, sex_t SEX, age_idx Ax, unsigned int print_gene, bool print_genotype, bool print_additive_genotype)
Definition: ttquanti.cc:3114
void write_PLINK()
Definition: ttquanti.cc:3177
void print_PLINK_FAM(ofstream &FH, age_idx Ax, Patch *patch)
Definition: ttquanti.cc:3369
TTQuantiFH(TProtoQuanti *T)
Definition: ttquanti.h:339
virtual void FHread(string &filename)
Definition: ttquanti.cc:3434
void print_PLINK_PED(ofstream &FH, age_idx Ax, Patch *patch)
Definition: ttquanti.cc:3292
void write_TABLE()
Definition: ttquanti.cc:3023
virtual void FHwrite()
Definition: ttquanti.cc:3001
virtual ~TTQuantiFH()
Definition: ttquanti.h:340
string _output_option
Definition: ttquanti.h:336
void setOutputOption(string opt)
Definition: ttquanti.cc:2988
Definition: ttquanti.h:257
double * _Vp
Definition: ttquanti.h:259
void addQuanti(age_t AGE)
Definition: ttquanti.cc:1923
void addAvgPerPatch(age_t AGE)
Definition: ttquanti.cc:2096
double ** _pVa
Definition: ttquanti.h:260
double getEigenVectorEltPerPatch(unsigned int p, unsigned int v)
Definition: ttquanti.h:322
vector< double > getVaNoDominance(Patch *curPop, const age_idx AGE)
Definition: ttquanti.cc:2684
double * _Vb
Definition: ttquanti.h:259
unsigned int _nb_trait
Definition: ttquanti.h:262
double getEigenVectorElt(unsigned int t1, unsigned int t2)
Definition: ttquanti.h:315
unsigned int _nb_locus
Definition: ttquanti.h:262
void addEigenStatsPerPatcg(age_t AGE)
void addCovarPerPatch(age_t AGE)
Definition: ttquanti.cc:2177
double * _meanP
Definition: ttquanti.h:259
void addEigenVect1PerPatch(age_t AGE)
Definition: ttquanti.cc:2296
void addVarPerPatch(age_t AGE)
Definition: ttquanti.cc:2131
TTQuantiSH(TProtoQuanti *TP)
Definition: ttquanti.h:274
virtual ~TTQuantiSH()
Definition: ttquanti.h:282
double ** _pVp
Definition: ttquanti.h:260
double getVa(unsigned int i)
Definition: ttquanti.h:308
bool _eVar
Definition: ttquanti.h:263
gsl_matrix * _evec
Definition: ttquanti.h:265
double getEigenValuePerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:320
unsigned int _table_set_age
Definition: ttquanti.h:270
void addEigenValuesPerPatch(age_t AGE)
Definition: ttquanti.cc:2262
double getVb(unsigned int i)
Definition: ttquanti.h:310
double getSkewPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.cc:2371
double ** _pmeanP
Definition: ttquanti.h:260
double * _meanG
Definition: ttquanti.h:259
double getMeanPhenotPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:317
void setStats(age_t AGE)
Definition: ttquanti.cc:2456
void setAdultStats()
Definition: ttquanti.h:304
double getVg(unsigned int i)
Definition: ttquanti.h:309
void addEigen(age_t AGE)
Definition: ttquanti.cc:1992
gsl_vector * _eval
Definition: ttquanti.h:266
double getMeanPhenot(unsigned int i)
Definition: ttquanti.h:307
double * _covar
Definition: ttquanti.h:259
DataTable< double > _phenoTable
Definition: ttquanti.h:269
double getCovarPerPatch(unsigned int p, unsigned int i)
Definition: ttquanti.h:321
double getEigenValue(unsigned int i)
Definition: ttquanti.h:314
double getQst(unsigned int i)
Definition: ttquanti.h:312
void addEigenPerPatch(age_t AGE)
Definition: ttquanti.cc:2218
vector< double > getVaWithDominance(Patch *curPop, const age_idx AGE)
computation of the additive genetic variance from the average excess of each allele exact under rando...
Definition: ttquanti.cc:2782
double getVp(unsigned int i)
Definition: ttquanti.h:311
vector< double > getSNPalleleFreqInPatch(Patch *patch)
Definition: ttquanti.cc:2593
gsl_matrix * _G
Definition: ttquanti.h:265
void addEigenVect1(age_t AGE)
Definition: ttquanti.cc:2051
double ** _peigvect
Definition: ttquanti.h:260
unsigned int _table_set_repl
Definition: ttquanti.h:270
double getVpPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:319
gsl_eigen_symmv_workspace * _ws
Definition: ttquanti.h:267
unsigned int _table_set_gen
Definition: ttquanti.h:270
double getCovar(unsigned int i)
Definition: ttquanti.h:313
virtual bool setStatRecorders(std::string &token)
Definition: ttquanti.cc:1865
DataTable< double > _genoTable
Definition: ttquanti.h:269
double * _Va
Definition: ttquanti.h:259
void addEigenValues(age_t AGE)
Definition: ttquanti.cc:2023
void resetPtrs()
Definition: ttquanti.cc:1734
double * _Vg
Definition: ttquanti.h:259
void setDataTables(age_t AGE)
Definition: ttquanti.cc:2386
void addQuantiPerPatch(age_t AGE)
Definition: ttquanti.cc:2078
double ** _peigval
Definition: ttquanti.h:260
unsigned int _patchNbr
Definition: ttquanti.h:262
double ** _pcovar
Definition: ttquanti.h:260
double ** _pmeanG
Definition: ttquanti.h:260
double getVaPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:318
void addSkewPerPatch(age_t AGE)
Definition: ttquanti.cc:2335
double * _eigval
Definition: ttquanti.h:259
void setOffsprgStats()
Definition: ttquanti.h:305
virtual void init()
Definition: ttquanti.cc:1794
double ** _eigvect
Definition: ttquanti.h:259
TTQuanti.
Definition: ttquanti.h:56
virtual void * getValue() const
Definition: ttquanti.h:77
TProtoQuanti * _myProto
Definition: ttquanti.h:105
double ** _sequence
Definition: ttquanti.h:102
virtual void inherit(TTrait *mother, TTrait *father)
Definition: ttquanti.cc:1627
virtual ~TTQuanti()
Definition: ttquanti.h:66
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttquanti.cc:1686
virtual void ** get_sequence() const
Definition: ttquanti.h:79
virtual void set_value()
Definition: ttquanti.cc:1646
double get_full_genotype(unsigned int trait)
Definition: ttquanti.cc:1671
virtual void show_up()
Definition: ttquanti.cc:1695
virtual void init()
Definition: ttquanti.cc:1456
double get_additive_genotype(unsigned int trait)
Definition: ttquanti.cc:1664
void set_phenotype(unsigned int trait, double value)
Definition: ttquanti.cc:1655
TTQuanti()
Definition: ttquanti.h:60
virtual TTQuanti & operator=(const TTrait &T)
Definition: ttquanti.cc:1394
void set_allele(int locus, int allele, double value)
Definition: ttquanti.h:97
virtual TTQuanti * clone()
Definition: ttquanti.h:83
TTQuanti(const TTQuanti &T)
Definition: ttquanti.h:63
void set_proto(TProtoQuanti *proto)
Definition: ttquanti.h:93
virtual void init_sequence()
Definition: ttquanti.cc:1478
virtual bool operator!=(const TTrait &T)
Definition: ttquanti.cc:1431
double * _phenotypes
Definition: ttquanti.h:103
virtual double get_allele_value(int loc, int all)
Definition: ttquanti.cc:1441
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttquanti.cc:1678
virtual void mutate()
Definition: ttquanti.cc:1639
virtual void set_allele_value(unsigned int locus, unsigned int allele, double value)
Definition: ttquanti.cc:1448
virtual void reset()
Definition: ttquanti.cc:1611
virtual void set_sequence(void **seq)
Definition: ttquanti.cc:1469
virtual void * set_trait(void *value)
Definition: ttquanti.h:74
virtual bool operator==(const TTrait &T)
Definition: ttquanti.cc:1415
virtual trait_t get_type() const
Definition: ttquanti.h:78
Interface for all trait types, declares all basic trait operations.
Definition: ttrait.h:46
Template class for the trait's FileHandler.
Definition: filehandler.h:217
Template class for the trait's StatHandler.
Definition: stathandler.h:168
double ALLELE
TTQuantiSH.
Definition: ttquanti.h:255
#define QUANT
Definition: types.h:72
std::string trait_t
Trait types.
Definition: types.h:63
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:36
unsigned int age_t
Age class flags.
Definition: types.h:46
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:54
#define OFFSPRG
Offspring age class flag.
Definition: types.h:50
age_idx
Array index of the age classes in the patch sizes and containers arrays.
Definition: types.h:41

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR