Nemo  2.4.1
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
TTQuantiSH Class Reference

TTQuantiSH. More...

#include <ttquanti.h>

+ Inheritance diagram for TTQuantiSH:
+ Collaboration diagram for TTQuantiSH:

Public Member Functions

 TTQuantiSH (TProtoQuanti *TP)
 
virtual ~TTQuantiSH ()
 
void resetPtrs ()
 
virtual void init ()
 
virtual bool setStatRecorders (std::string &token)
 
void addQuanti (age_t AGE)
 
void addQuantiPerPatch (age_t AGE)
 
void addAvgPerPatch (age_t AGE)
 
void addGenotPerPatch (age_t AGE)
 
void addVarPerPatch (age_t AGE)
 
void addCovarPerPatch (age_t AGE)
 
void addEigenPerPatch (age_t AGE)
 
void addEigenValuesPerPatch (age_t AGE)
 
void addEigenVect1PerPatch (age_t AGE)
 
void addSkewPerPatch (age_t AGE)
 
void setDataTables (age_t AGE)
 
void setAdultStats ()
 
void setOffsprgStats ()
 
void setStats (age_t AGE)
 
double getMeanGenot (unsigned int i)
 
double getMeanPhenot (unsigned int i)
 
double getVa (unsigned int i)
 
double getVg (unsigned int i)
 
double getVb (unsigned int i)
 
double getVp (unsigned int i)
 
double getQst (unsigned int i)
 
double getCovar (unsigned int i)
 
double getMeanGenotPerPatch (unsigned int i, unsigned int p)
 
double getMeanPhenotPerPatch (unsigned int i, unsigned int p)
 
double getVaPerPatch (unsigned int i, unsigned int p)
 
double getVpPerPatch (unsigned int i, unsigned int p)
 
double getEigenValuePerPatch (unsigned int i, unsigned int p)
 
double getCovarPerPatch (unsigned int p, unsigned int i)
 
double getEigenVectorEltPerPatch (unsigned int p, unsigned int v)
 
double getSkewPerPatch (unsigned int i, unsigned int p)
 
vector< double > getSNPalleleFreqInPatch (Patch *patch, const age_idx AGE)
 
vector< double > getVaWithDominance (Patch *curPop, const age_idx AGE)
 computation of the additive genetic variance from the average excess of each allele exact under random mating only More...
 
vector< double > getVaNoDominance (Patch *curPop, const age_idx AGE)
 
- Public Member Functions inherited from TraitStatHandler< TProtoQuanti, TTQuantiSH >
 TraitStatHandler (TProtoQuanti *trait_proto)
 
virtual ~TraitStatHandler ()
 
- Public Member Functions inherited from StatHandler< SH >
 StatHandler ()
 
virtual ~StatHandler ()
 
virtual void clear ()
 Empties the _recorders list, they are destroyed in StatHandlerBase::reset(). More...
 
virtual StatRecorder< SH > * add (std::string Title, std::string Name, age_t AGE, unsigned int ARG1, unsigned int ARG2, double(SH::*getStatNoArg)(void), double(SH::*getStatOneArg)(unsigned int), double(SH::*getStatTwoArg)(unsigned int, unsigned int), void(SH::*setStat)(void))
 Adds a StatRecorder to the list, it is also added to the StatHandlerBase::_stats list. More...
 
- Public Member Functions inherited from StatHandlerBase
 StatHandlerBase ()
 
virtual ~StatHandlerBase ()
 
virtual void reset ()
 Empties the _stats list and calls clear() (defined in the derived class). More...
 
Metapopget_pop_ptr ()
 
void set_service (StatServices *srv)
 
StatServicesget_service ()
 
unsigned int getOccurrence ()
 
unsigned int getNumOccurrences ()
 
unsigned int getCurrentOccurrence ()
 
unsigned int getNbRecorders ()
 
std::list< StatRecBase * > & getStats ()
 
virtual void add (StatRecBase *rec)
 
virtual void update ()
 This function is left empty as the StatServices calls StatRecorder::setVal directly. More...
 
- Public Member Functions inherited from Handler
virtual ~Handler ()
 

Private Attributes

double * _meanP
 
double * _meanG
 
double * _Va
 
double * _Vg
 
double * _Vb
 
double * _Vp
 
double * _covar
 
double ** _pmeanP
 
double ** _pmeanG
 
double ** _pVa
 
double ** _pVp
 
double ** _pcovar
 
double ** _peigval
 
double ** _peigvect
 
bool _eVar
 
unsigned int _num_locus
 
unsigned int _num_trait
 
unsigned int _patchNbr
 
gsl_matrix * _G
 
gsl_matrix * _evec
 
gsl_vector * _eval
 
gsl_eigen_symmv_workspace * _ws
 
DataTable< double > _phenoTable
 
DataTable< double > _genoTable
 
unsigned int _table_set_gen
 
unsigned int _table_set_age
 
unsigned int _table_set_repl
 

Additional Inherited Members

- Protected Types inherited from StatHandler< SH >
typedef std::list< StatRecorder< SH > * >::iterator REC_IT
 
- Protected Attributes inherited from TraitStatHandler< TProtoQuanti, TTQuantiSH >
TProtoQuanti_SHLinkedTrait
 Pointer to a TraitProtoype object. More...
 
int _SHLinkedTraitIndex
 Index of the trait in the Individual::Traits table. More...
 
- Protected Attributes inherited from StatHandler< SH >
std::list< StatRecorder< SH > * > _recorders
 The list of stat recorders. More...
 
- Protected Attributes inherited from StatHandlerBase
Metapop_pop
 Link to the current population, set through the link to the StatService. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ TTQuantiSH()

TTQuantiSH::TTQuantiSH ( TProtoQuanti TP)
inline
752  _meanP(0), _meanG(0), _Va(0), _Vg(0), _Vb(0), _Vp(0), _covar(0),
753  _pmeanP(0), _pmeanG(0), _pVa(0), _pVp(0), _pcovar(0), _peigval(0), _peigvect(0),
754  _eVar(0), _num_locus(0), _num_trait(0),_patchNbr(0), _G(0), _evec(0),_eval(0),_ws(0),
755  _table_set_gen(999999), _table_set_age(999999), _table_set_repl(999999)
756  {}
double * _Vp
Definition: ttquanti.h:735
double ** _pVa
Definition: ttquanti.h:736
double * _Vb
Definition: ttquanti.h:735
unsigned int _num_locus
Definition: ttquanti.h:739
double * _meanP
Definition: ttquanti.h:735
double ** _pVp
Definition: ttquanti.h:736
bool _eVar
Definition: ttquanti.h:737
gsl_matrix * _evec
Definition: ttquanti.h:741
unsigned int _table_set_age
Definition: ttquanti.h:746
double ** _pmeanP
Definition: ttquanti.h:736
double * _meanG
Definition: ttquanti.h:735
gsl_vector * _eval
Definition: ttquanti.h:742
double * _covar
Definition: ttquanti.h:735
gsl_matrix * _G
Definition: ttquanti.h:741
double ** _peigvect
Definition: ttquanti.h:736
unsigned int _table_set_repl
Definition: ttquanti.h:746
gsl_eigen_symmv_workspace * _ws
Definition: ttquanti.h:743
unsigned int _table_set_gen
Definition: ttquanti.h:746
unsigned int _num_trait
Definition: ttquanti.h:739
double * _Va
Definition: ttquanti.h:735
double * _Vg
Definition: ttquanti.h:735
double ** _peigval
Definition: ttquanti.h:736
unsigned int _patchNbr
Definition: ttquanti.h:739
double ** _pcovar
Definition: ttquanti.h:736
double ** _pmeanG
Definition: ttquanti.h:736

◆ ~TTQuantiSH()

virtual TTQuantiSH::~TTQuantiSH ( )
inlinevirtual
758 {resetPtrs();}
void resetPtrs()
Definition: ttquanti.cc:4542

References resetPtrs().

Member Function Documentation

◆ addAvgPerPatch()

void TTQuantiSH::addAvgPerPatch ( age_t  AGE)
4821 {
4822  if (AGE == ALL) {
4825  return;
4826  }
4827 
4828  unsigned int patchNbr = _pop->getPatchNbr();
4829 
4830  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4831  string name;
4832  string patch;
4833  string t1;
4834 
4835  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4837 
4838  add("Mean phenotype of trait 1 in patch 1", suffix + "q1.p1", AGE, 0, 0, 0, 0,
4840 
4841  for(unsigned int p = 0; p < patchNbr; p++) {
4842  for(unsigned int i = 0; i < _num_trait; i++) {
4843  if(p == 0 && i == 0) continue;
4844  name = "Mean phenotype of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4845  t1 = "q" + tstring::int2str(i+1);
4846  patch = ".p" + tstring::int2str(p+1);
4847  add(name, suffix + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getMeanPhenotPerPatch, 0);
4848  }
4849  }
4850 
4851 }
unsigned int getPatchNbr()
Definition: metapop.h:275
Metapop * _pop
Link to the current population, set through the link to the StatService.
Definition: stathandler.h:60
virtual StatRecorder< SH > * add(std::string Title, std::string Name, age_t AGE, unsigned int ARG1, unsigned int ARG2, double(SH::*getStatNoArg)(void), double(SH::*getStatOneArg)(unsigned int), double(SH::*getStatTwoArg)(unsigned int, unsigned int), void(SH::*setStat)(void))
Adds a StatRecorder to the list, it is also added to the StatHandlerBase::_stats list.
Definition: stathandler.h:143
TTQuantiSH.
Definition: ttquanti.h:733
void addAvgPerPatch(age_t AGE)
Definition: ttquanti.cc:4820
double getMeanPhenotPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:791
void setAdultStats()
Definition: ttquanti.h:778
void setOffsprgStats()
Definition: ttquanti.h:779
static string int2str(const int i)
Writes an integer value into a string.
Definition: tstring.h:94
#define ALL
All ages age class flag.
Definition: types.h:55
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:53
#define OFFSPRG
Offspring age class flag.
Definition: types.h:49

References _num_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), ADULTS, ALL, getMeanPhenotPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().

Referenced by addQuantiPerPatch(), and setStatRecorders().

+ Here is the caller graph for this function:

◆ addCovarPerPatch()

void TTQuantiSH::addCovarPerPatch ( age_t  AGE)
4944 {
4945  if(_num_trait < 2) {
4946  // warning("not recording traits covariance with only one \"quanti\" trait!");
4947  return;
4948  }
4949 
4950  if (AGE == ALL) {
4953  return;
4954  }
4955 
4956  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4957  string patch;
4958  string cov;
4959  unsigned int patchNbr = _pop->getPatchNbr();
4960 
4961  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4963 
4964  add("Genetic covariance of trait 1 and trait 2 in patch 1", suffix + "cov.q12.p1", AGE, 0, 0, 0, 0,
4965  &TTQuantiSH::getCovarPerPatch, setter);
4966 
4967  unsigned int c;
4968  for(unsigned int p = 0; p < patchNbr; p++) {
4969  patch = ".p" + tstring::int2str(p+1);
4970  c = 0;
4971  for(unsigned int t = 0; t < _num_trait; ++t) {
4972  for(unsigned int v = t + 1; v < _num_trait; ++v){
4973  if(p==0 && t==0 && v==1) {c++; continue;} //this on is already recorder above
4974  cov = tstring::int2str((t+1)*10+v+1);
4975  add("", suffix + "cov.q" + cov + patch, AGE, c++, p, 0, 0, &TTQuantiSH::getCovarPerPatch, 0);
4976  }
4977  }
4978  }
4979 
4980 }
void addCovarPerPatch(age_t AGE)
Definition: ttquanti.cc:4943
double getCovarPerPatch(unsigned int p, unsigned int i)
Definition: ttquanti.h:795

References _num_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), ADULTS, ALL, getCovarPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().

Referenced by addQuantiPerPatch(), and setStatRecorders().

+ Here is the caller graph for this function:

◆ addEigenPerPatch()

void TTQuantiSH::addEigenPerPatch ( age_t  AGE)
4985 {
4986  if(_num_trait < 2) {
4987  warning("not recording G-matrix eigen stats with only one \"quanti\" trait!\n");
4988  return;
4989  }
4990 
4991  if (AGE == ALL) {
4994  return;
4995  }
4996 
4997  unsigned int patchNbr = _pop->getPatchNbr();
4998  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4999  string patch;
5000  unsigned int pv =0;
5001 
5002  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
5004 
5005 
5006  add("First G-matrix eigenvalue in patch 1", suffix + "qeval1.p1", AGE, 0, 0, 0, 0,
5008 
5009  for(unsigned int p = 0; p < patchNbr; ++p) {
5010  patch = ".p" + tstring::int2str(p+1);
5011  for(unsigned int t = 0; t < _num_trait; ++t) {
5012  if(p==0 && t==0) continue;
5013  add("", suffix + "qeval" + tstring::int2str(t+1) + patch, AGE, t, p, 0, 0, &TTQuantiSH::getEigenValuePerPatch,0);
5014  }
5015  }
5016  for(unsigned int p = 0; p < patchNbr; ++p) {
5017  patch = ".p" + tstring::int2str(p+1);
5018  pv = 0;
5019  for(unsigned int t = 0; t < _num_trait; ++t)
5020  for(unsigned int v = 0; v < _num_trait; ++v)
5021  add("", suffix + "qevect" + tstring::int2str((t+1)*10+v+1) + patch, AGE, p, pv++, 0, 0, &TTQuantiSH::getEigenVectorEltPerPatch,0);
5022  }
5023 
5024 }
double getEigenVectorEltPerPatch(unsigned int p, unsigned int v)
Definition: ttquanti.h:796
double getEigenValuePerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:794
void addEigenPerPatch(age_t AGE)
Definition: ttquanti.cc:4984
void warning(const char *str,...)
Definition: output.cc:57

References _num_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), ADULTS, ALL, getEigenValuePerPatch(), getEigenVectorEltPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().

Referenced by setStatRecorders().

+ Here is the caller graph for this function:

◆ addEigenValuesPerPatch()

void TTQuantiSH::addEigenValuesPerPatch ( age_t  AGE)
5029 {
5030  if(_num_trait < 2) {
5031  warning("not recording G-matrix eigen stats with only one \"quanti\" trait!\n");
5032  return;
5033  }
5034 
5035  if (AGE == ALL) {
5038  return;
5039  }
5040 
5041  unsigned int patchNbr = _pop->getPatchNbr();
5042  string suffix = (AGE == ADULTS ? "adlt.":"off.");
5043  string patch;
5044 
5045  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
5047 
5048  add("First G-matrix eigenvalue in patch 1", suffix + "qeval1.p1", AGE, 0, 0, 0, 0,
5050 
5051  for(unsigned int p = 0; p < patchNbr; ++p) {
5052  patch = ".p" + tstring::int2str(p+1);
5053  for(unsigned int t = 0; t < _num_trait; ++t) {
5054  if(p==0 && t==0) continue;
5055  add("", suffix + "qeval" + tstring::int2str(t+1) + patch, AGE, t, p, 0, 0, &TTQuantiSH::getEigenValuePerPatch,0);
5056  }
5057  }
5058 }
void addEigenValuesPerPatch(age_t AGE)
Definition: ttquanti.cc:5028

References _num_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), ADULTS, ALL, getEigenValuePerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().

Referenced by setStatRecorders().

+ Here is the caller graph for this function:

◆ addEigenVect1PerPatch()

void TTQuantiSH::addEigenVect1PerPatch ( age_t  AGE)
5063 {
5064  if(_num_trait < 2) {
5065  warning("not recording G-matrix eigen stats with only one \"quanti\" trait!\n");
5066  return;
5067  }
5068 
5069  if (AGE == ALL) {
5072  return;
5073  }
5074 
5075  unsigned int patchNbr = _pop->getPatchNbr();
5076  string suffix = (AGE == ADULTS ? "adlt.":"off.");
5077  string patch;
5078  unsigned int pv =0;
5079 
5080  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
5083 
5084 
5085  add("First G-matrix eigenvector in patch 1", suffix + "qevect11.p1", AGE, 0, 0, 0, 0,
5087 
5088  for(unsigned int p = 0; p < patchNbr; ++p) {
5089  patch = ".p" + tstring::int2str(p+1);
5090  pv = 0;
5091  // for(unsigned int t = 0; t < _num_trait; ++t)
5092  for(unsigned int v = 0; v < _num_trait; ++v){
5093  if(p==0 && v==0) {pv++; continue;}
5094  add("", suffix + "qevect1" + tstring::int2str(v+1) + patch, AGE, p, pv++, 0, 0, &TTQuantiSH::getEigenVectorEltPerPatch,0);
5095  }
5096  }
5097 }
void addEigenVect1PerPatch(age_t AGE)
Definition: ttquanti.cc:5062

References _num_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), ADULTS, ALL, getEigenVectorEltPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().

Referenced by setStatRecorders().

+ Here is the caller graph for this function:

◆ addGenotPerPatch()

void TTQuantiSH::addGenotPerPatch ( age_t  AGE)
4856 {
4857  if (AGE == ALL) {
4860  return;
4861  }
4862 
4863  unsigned int patchNbr = _pop->getPatchNbr();
4864 
4865  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4866  string name;
4867  string patch;
4868  string t1;
4869 
4870  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4872 
4873  add("Mean genotype of trait 1 in patch 1", suffix + "g1.p1", AGE, 0, 0, 0, 0,
4875 
4876  for(unsigned int p = 0; p < patchNbr; p++) {
4877  for(unsigned int i = 0; i < _num_trait; i++) {
4878  if(p == 0 && i == 0) continue;
4879  name = "Mean genotype of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4880  t1 = "g" + tstring::int2str(i+1);
4881  patch = ".p" + tstring::int2str(p+1);
4882  add(name, suffix + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getMeanGenotPerPatch, 0);
4883  }
4884  }
4885 
4886 }
double getMeanGenotPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:790
void addGenotPerPatch(age_t AGE)
Definition: ttquanti.cc:4855

References _num_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), ADULTS, ALL, getMeanGenotPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().

Referenced by setStatRecorders().

+ Here is the caller graph for this function:

◆ addQuanti()

void TTQuantiSH::addQuanti ( age_t  AGE)
4736 {
4737  if (AGE == ALL) {
4738  addQuanti(ADULTS);
4739  addQuanti(OFFSPRG);
4740  return;
4741  }
4742 
4743  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4744  string name = suffix + "q";
4745  string t1, t2;
4746 
4747  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4749 
4750  add("",suffix + "q1",AGE,0,0,0,&TTQuantiSH::getMeanPhenot,0,setter);
4751 
4752  for(unsigned int i = 1; i < _num_trait; i++) {
4753  t1 = tstring::int2str(i+1);
4754  add("", name + t1,AGE,i,0,0,&TTQuantiSH::getMeanPhenot,0,0);
4755  }
4756 
4757  //Va, no dominance, no epistasis
4759  for(unsigned int i = 0; i < _num_trait; i++) {
4760  t1 = tstring::int2str(i+1);
4761  add("", name + t1 +".Va",AGE,i,0,0,&TTQuantiSH::getVa,0,0);
4762  }
4763  } else {
4764  //if dominance or epistasis, then what we record is Vg, not Va
4765  for(unsigned int i = 0; i < _num_trait; i++) {
4766  t1 = tstring::int2str(i+1);
4767  add("", name + t1 +".Vg",AGE,i,0,0,&TTQuantiSH::getVa,0,0);
4768  }
4769  }
4770 
4771  //Vp
4772  if(_eVar) {
4773  for(unsigned int i = 0; i < _num_trait; i++) {
4774  t1 = tstring::int2str(i+1);
4775  add("", name + t1 +".Vp",AGE,i,0,0,&TTQuantiSH::getVp,0,0);
4776  }
4777  }
4778  //Vb
4779  if(_pop->getPatchNbr() > 1){
4780  for(unsigned int i = 0; i < _num_trait; i++) {
4781  t1 = tstring::int2str(i+1);
4782  add("", name + t1 +".Vb",AGE,i,0,0,&TTQuantiSH::getVb,0,0);
4783  }
4784  //Qst
4785  for(unsigned int i = 0; i < _num_trait; i++) {
4786  t1 = tstring::int2str(i+1);
4787  add("", name + t1 +".Qst",AGE,i,0,0,&TTQuantiSH::getQst,0,0);
4788  }
4789  }
4790 
4791  if (_num_trait > 1) {
4792  unsigned int c = 0;
4793  for(unsigned int t = 0; t < _num_trait; ++t) {
4794  for(unsigned int v = t + 1; v < _num_trait; ++v) {
4795  t1 = tstring::int2str((t+1)*10+(v+1));
4796  add("", name + t1 +".cov", AGE, c++, 0,0,&TTQuantiSH::getCovar,0,0);
4797  }
4798  }
4799  }
4800 }
bool do_epistasis()
Definition: ttquanti.h:566
unsigned int get_dominance_model()
Definition: ttquanti.h:477
void addQuanti(age_t AGE)
Definition: ttquanti.cc:4735
double getVa(unsigned int i)
Definition: ttquanti.h:783
double getVb(unsigned int i)
Definition: ttquanti.h:785
double getMeanPhenot(unsigned int i)
Definition: ttquanti.h:782
double getQst(unsigned int i)
Definition: ttquanti.h:787
double getVp(unsigned int i)
Definition: ttquanti.h:786
double getCovar(unsigned int i)
Definition: ttquanti.h:788
TProtoQuanti * _SHLinkedTrait
Pointer to a TraitProtoype object.
Definition: stathandler.h:170

References _eVar, _num_trait, StatHandlerBase::_pop, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, StatHandler< SH >::add(), ADULTS, ALL, TProtoQuanti::do_epistasis(), TProtoQuanti::get_dominance_model(), getCovar(), getMeanPhenot(), Metapop::getPatchNbr(), getQst(), getVa(), getVb(), getVp(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().

Referenced by setStatRecorders().

+ Here is the caller graph for this function:

◆ addQuantiPerPatch()

void TTQuantiSH::addQuantiPerPatch ( age_t  AGE)
4805 {
4806 
4807  if (AGE == ALL) {
4810  return;
4811  }
4812 
4813  addAvgPerPatch(AGE);
4814  addVarPerPatch(AGE);
4815  addCovarPerPatch(AGE);
4816 }
void addVarPerPatch(age_t AGE)
Definition: ttquanti.cc:4890
void addQuantiPerPatch(age_t AGE)
Definition: ttquanti.cc:4804

References addAvgPerPatch(), addCovarPerPatch(), addVarPerPatch(), ADULTS, ALL, and OFFSPRG.

Referenced by setStatRecorders().

+ Here is the caller graph for this function:

◆ addSkewPerPatch()

void TTQuantiSH::addSkewPerPatch ( age_t  AGE)
5102 {
5103  if (AGE == ALL) {
5106  return;
5107  }
5108 
5109  unsigned int patchNbr = _pop->getPatchNbr();
5110 
5111  string suffix = (AGE == ADULTS ? "adlt.":"off.");
5112  string name;
5113  string patch;
5114  string t1;
5115 
5116  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
5119 
5120  add("Genetic skew of trait 1 in patch 1", suffix + "Sk.q1.p1", AGE, 0, 0, 0, 0,
5121  &TTQuantiSH::getSkewPerPatch, setter);
5122 
5123  for(unsigned int p = 0; p < patchNbr; p++) {
5124  for(unsigned int i = 0; i < _num_trait; i++) {
5125  if(p == 0 && i == 0) continue;
5126  name = "Genetic skew of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
5127  t1 = "q" + tstring::int2str(i+1);
5128  patch = ".p" + tstring::int2str(p+1);
5129  add(name, suffix + "Sk." + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getSkewPerPatch, 0);
5130  }
5131  }
5132 
5133 }
double getSkewPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.cc:5137
void addSkewPerPatch(age_t AGE)
Definition: ttquanti.cc:5101

References _num_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), ADULTS, ALL, Metapop::getPatchNbr(), getSkewPerPatch(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().

Referenced by setStatRecorders().

+ Here is the caller graph for this function:

◆ addVarPerPatch()

void TTQuantiSH::addVarPerPatch ( age_t  AGE)
4891 {
4892  if (AGE == ALL) {
4895  return;
4896  }
4897 
4898  unsigned int patchNbr = _pop->getPatchNbr();
4899 
4900  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4901  string name;
4902  string patch;
4903  string t1;
4904  string Vtype;
4905 
4906 
4908  Vtype = "Vg.";
4909  else
4910  Vtype = "Va.";
4911 
4912  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4915 
4916  add("Genetic variance of trait 1 in patch 1", suffix + Vtype + "q1.p1", AGE, 0, 0, 0, 0,
4917  &TTQuantiSH::getVaPerPatch, setter);
4918 
4919  for(unsigned int p = 0; p < patchNbr; p++) {
4920  for(unsigned int i = 0; i < _num_trait; i++) {
4921  if(p == 0 && i == 0) continue;
4922  name = "Genetic variance of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4923  t1 = "q" + tstring::int2str(i+1);
4924  patch = ".p" + tstring::int2str(p+1);
4925  add(name, suffix + Vtype + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getVaPerPatch, 0);
4926  }
4927  }
4928 
4929  if(_eVar) {
4930  for(unsigned int p = 0; p < patchNbr; p++) {
4931  for(unsigned int i = 0; i < _num_trait; i++) {
4932  name = "Phenotypic variance of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4933  t1 = "q" + tstring::int2str(i+1);
4934  patch = ".p" + tstring::int2str(p+1);
4935  add(name, suffix + "Vp." + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getVpPerPatch, 0);
4936  }
4937  }
4938  }
4939 }
double getVpPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:793
double getVaPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:792

References _eVar, _num_trait, StatHandlerBase::_pop, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, StatHandler< SH >::add(), ADULTS, ALL, TProtoQuanti::do_epistasis(), TProtoQuanti::get_dominance_model(), Metapop::getPatchNbr(), getVaPerPatch(), getVpPerPatch(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().

Referenced by addQuantiPerPatch(), and setStatRecorders().

+ Here is the caller graph for this function:

◆ getCovar()

double TTQuantiSH::getCovar ( unsigned int  i)
inline
788 {return _covar[i];}

References _covar.

Referenced by addQuanti().

+ Here is the caller graph for this function:

◆ getCovarPerPatch()

double TTQuantiSH::getCovarPerPatch ( unsigned int  p,
unsigned int  i 
)
inline
795 {return _pcovar[p][i];}

References _pcovar.

Referenced by addCovarPerPatch().

+ Here is the caller graph for this function:

◆ getEigenValuePerPatch()

double TTQuantiSH::getEigenValuePerPatch ( unsigned int  i,
unsigned int  p 
)
inline
794 {return _peigval[i][p];}

References _peigval.

Referenced by addEigenPerPatch(), and addEigenValuesPerPatch().

+ Here is the caller graph for this function:

◆ getEigenVectorEltPerPatch()

double TTQuantiSH::getEigenVectorEltPerPatch ( unsigned int  p,
unsigned int  v 
)
inline
796 {return _peigvect[p][v];}

References _peigvect.

Referenced by addEigenPerPatch(), and addEigenVect1PerPatch().

+ Here is the caller graph for this function:

◆ getMeanGenot()

double TTQuantiSH::getMeanGenot ( unsigned int  i)
inline
781 {return _meanG[i];}

References _meanG.

◆ getMeanGenotPerPatch()

double TTQuantiSH::getMeanGenotPerPatch ( unsigned int  i,
unsigned int  p 
)
inline
790 {return _pmeanG[i][p];}

References _pmeanG.

Referenced by addGenotPerPatch().

+ Here is the caller graph for this function:

◆ getMeanPhenot()

double TTQuantiSH::getMeanPhenot ( unsigned int  i)
inline
782 {return _meanP[i];}

References _meanP.

Referenced by addQuanti().

+ Here is the caller graph for this function:

◆ getMeanPhenotPerPatch()

double TTQuantiSH::getMeanPhenotPerPatch ( unsigned int  i,
unsigned int  p 
)
inline
791 {return _pmeanP[i][p];}

References _pmeanP.

Referenced by addAvgPerPatch().

+ Here is the caller graph for this function:

◆ getQst()

double TTQuantiSH::getQst ( unsigned int  i)
inline
787 {return _Vb[i]/(_Vb[i]+2*_Va[i]);}

References _Va, and _Vb.

Referenced by addQuanti().

+ Here is the caller graph for this function:

◆ getSkewPerPatch()

double TTQuantiSH::getSkewPerPatch ( unsigned int  i,
unsigned int  p 
)
5138 {
5139  double skew = 0;
5140 
5141  double *phenot = _phenoTable.getClassWithinGroup(i, p);
5142  unsigned int patch_size = _phenoTable.size(i, p);
5143 
5144  for(unsigned int k = 0; k < patch_size; ++k)
5145  skew += pow( phenot[k] - _pmeanP[i][p], 3); //the mean has been set by setStats()
5146 
5147  return skew / patch_size;
5148 }
unsigned int size(unsigned int i, unsigned int j)
Definition: datatable.h:259
T * getClassWithinGroup(unsigned int group, unsigned int Class)
Accessor to a class array whithin a group.
Definition: datatable.h:224
DataTable< double > _phenoTable
Definition: ttquanti.h:745

References _phenoTable, _pmeanP, DataTable< T >::getClassWithinGroup(), and DataTable< T >::size().

Referenced by addSkewPerPatch().

+ Here is the caller graph for this function:

◆ getSNPalleleFreqInPatch()

vector< double > TTQuantiSH::getSNPalleleFreqInPatch ( Patch patch,
const age_idx  AGE 
)
5345 {
5346  //ONLY IMPLEMENTED FOR DIALLELIC LOCI!
5347  if(_SHLinkedTrait->get_allele_model() > 1)
5348  fatal("TTQuantiSH::getSNPalleleFreqInPatch::SNP allele frequencies can only be computed for di-allelic loci, sorry!\n");
5349 
5350  Individual* ind;
5351  TTQuanti* Qtrait;
5352 
5353  if(!_SHLinkedTrait) fatal("TTQuantiSH::getSNPalleleFreqInPatch:: Pointer to trait prototype is not set!\n");
5354 
5355  unsigned int seqLength = _SHLinkedTrait->get_seq_length();
5356 
5357  //create a null vector of the total sequence size, including alleles affecting all traits (max 2 for di-allelic loci)
5358  vector<double> snp_tab(seqLength, 0.0);
5359 
5360  for(unsigned int s = 0; s < 2; ++s){
5361 
5362  for(unsigned int j = 0, size = patch->size(sex_t(s), AGE); j < size; ++j) {
5363 
5364  ind = patch->get(sex_t(s), AGE, j);
5365 
5366  Qtrait = dynamic_cast<TTQuanti*>(ind->getTrait(_SHLinkedTraitIndex));
5367 
5368  //compute allele freq at all positions, we count allele 0 (freq 'p' is for trait-increasing allele in diallelic model)
5369  for(unsigned int i = 0; i < seqLength; ++i) {
5370  snp_tab[i] += !Qtrait->get_allele_bit(i, 0) + !Qtrait->get_allele_bit(i, 1);
5371  }
5372 
5373  }
5374 
5375  }
5376 
5377  // pre-compute 1/2N :
5378  double inv_size = 1.0/(2.0*patch->size(AGE));
5379 
5380  std::transform(snp_tab.cbegin(), snp_tab.cend(), snp_tab.begin(), [inv_size](double i){return i*inv_size;});
5381 
5382  return snp_tab;
5383 }
This class contains traits along with other individual information (sex, pedigree,...
Definition: individual.h:48
TTrait * getTrait(IDX T)
Trait accessor.
Definition: individual.h:276
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:497
Individual * get(sex_t SEX, age_idx AGE, unsigned int at)
Returns a pointer to the individual sitting at the index passed.
Definition: metapop.h:533
unsigned int get_allele_model()
Definition: ttquanti.h:433
unsigned int get_seq_length()
Definition: ttquanti.h:426
TTQuanti.
Definition: ttquanti.h:60
virtual bool get_allele_bit(unsigned int position, unsigned int allele) const =0
int _SHLinkedTraitIndex
Index of the trait in the Individual::Traits table.
Definition: stathandler.h:172
void fatal(const char *str,...)
Definition: output.cc:99
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:35

References TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, fatal(), Patch::get(), TTQuanti::get_allele_bit(), TProtoQuanti::get_allele_model(), TProtoQuanti::get_seq_length(), Individual::getTrait(), and Patch::size().

Referenced by getVaNoDominance(), and getVaWithDominance().

+ Here is the caller graph for this function:

◆ getVa()

double TTQuantiSH::getVa ( unsigned int  i)
inline
783 {return _Va[i];}

References _Va.

Referenced by addQuanti().

+ Here is the caller graph for this function:

◆ getVaNoDominance()

vector< double > TTQuantiSH::getVaNoDominance ( Patch curPop,
const age_idx  AGE 
)

CYCLE THROUGH ALL TRAITS

5388 {
5389  // function called by LCE_QuantiModifier when setting fixed h^2
5390  unsigned int sizeF = patch->size(FEM, AGE),
5391  sizeM = patch->size(MAL, AGE);
5392  unsigned int size = sizeF + sizeM;
5393 
5394  if(!size) {return vector<double>(_num_trait, -1.0);}
5395 
5396  TTQuanti* trait;
5397 
5398  double G, meanG;
5399 
5400  vector< double > varA(_num_trait, 0.0);
5401 
5402  double *genot = new double[size];
5403 
5405  for(unsigned int TRAIT = 0; TRAIT < _num_trait; ++TRAIT)
5406  {
5407 
5408  meanG = 0;
5409 
5410  // females
5411 
5412  Individual* curInd;
5413  unsigned int gpos = 0;
5414 
5415  for(unsigned int i = 0; i < sizeF && gpos < size; ++i )
5416  {
5417  curInd = patch->get(FEM, AGE, i);
5418 
5419  trait = dynamic_cast<TTQuanti*>(curInd->getTrait(_SHLinkedTraitIndex));
5420 
5421  G = trait->get_additive_genotype(TRAIT); // genotype value
5422 
5423  genot[gpos++] = G;
5424 
5425  meanG += G;
5426 
5427  } // for each female
5428 
5429  // males
5430  for(unsigned int i = 0; i < sizeM && gpos < size; ++i )
5431  {
5432  curInd = patch->get(MAL, AGE, i);
5433 
5434  trait = dynamic_cast<TTQuanti*>(curInd->getTrait(_SHLinkedTraitIndex));
5435 
5436  G = trait->get_additive_genotype(TRAIT); // genotype value
5437 
5438  genot[gpos++] = G;
5439 
5440  meanG += G;
5441 
5442  } // for each male
5443 
5444  assert(gpos == size);
5445 
5446  meanG /= size;
5447 
5448  varA[TRAIT] = my_variance_with_fixed_mean(genot, size, meanG); // not a sample variance
5449 
5450  // record the genotypic variance in the stater
5451  _Vg[TRAIT] = varA[TRAIT];
5452 
5453 #ifdef _DEBUG_
5454  message("TTQuantiSH::getVaNoDominance:: Va = %d\n",varA[TRAIT]);
5455 
5456  const TMatrix& allele_value = _SHLinkedTrait->get_diallele_values(); // nlocus x 2
5457  double Vacheck = 0, a, d,avG;
5458  //compute the allele frequencies:
5459  vector< double > freqs = getSNPalleleFreqInPatch(patch, AGE); //it has num locus x num traits elements, in a 1D array
5460 
5461  for(unsigned int l = 0, pos; l < _num_locus; ++l)
5462  {
5463  pos = l * _num_trait + TRAIT;
5464  a = abs(allele_value.get(l,0) - allele_value.get(l,1))/2;
5465  d = allele_value.get(l,0)+allele_value.get(l,1);
5466  avG = a + d*(1-2*freqs[pos]);
5467  Vacheck += 2*freqs[pos]*(1 - freqs[pos])*avG*avG;
5468  }
5469 
5470  message("TTQuantiSH::getVaNoDominance:: Va check = %d\n",Vacheck);
5471 #endif
5472 
5473  }
5474 
5475  delete [] genot;
5476 
5477  return varA;
5478 }
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) const
Accessor to element at row i and column j.
Definition: tmatrix.h:192
const TMatrix & get_diallele_values()
Definition: ttquanti.h:434
vector< double > getSNPalleleFreqInPatch(Patch *patch, const age_idx AGE)
Definition: ttquanti.cc:5344
virtual double get_additive_genotype(const unsigned int trait) const =0
void message(const char *message,...)
Definition: output.cc:39
@ FEM
Definition: types.h:36
@ MAL
Definition: types.h:36
double my_variance_with_fixed_mean(double *data, unsigned int size, double mean)
Definition: utils.cc:62

References _num_locus, _num_trait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, _Vg, FEM, Patch::get(), TMatrix::get(), TTQuanti::get_additive_genotype(), TProtoQuanti::get_diallele_values(), getSNPalleleFreqInPatch(), Individual::getTrait(), MAL, message(), my_variance_with_fixed_mean(), and Patch::size().

Referenced by LCE_QuantiModifier::setParameters(), and LCE_Breed_Quanti::setParameters().

+ Here is the caller graph for this function:

◆ getVaPerPatch()

double TTQuantiSH::getVaPerPatch ( unsigned int  i,
unsigned int  p 
)
inline
792 {return _pVa[i][p];}

References _pVa.

Referenced by addVarPerPatch().

+ Here is the caller graph for this function:

◆ getVaWithDominance()

vector< double > TTQuantiSH::getVaWithDominance ( Patch curPop,
const age_idx  AGE 
)

computation of the additive genetic variance from the average excess of each allele exact under random mating only

CYCLE THROUGH ALL TRAITS

5487 {
5488  // function called by LCE_QuantiModifier when setting fixed h^2
5489  if(_SHLinkedTrait->get_allele_model() > 2)
5490  fatal("Quanti Trait StatHandler::Va with dominance can only be estimated for di-allelic loci, sorry!\n");
5491 
5492  unsigned int size = patch->size(AGE);
5493 
5494 #ifdef _DEBUG_
5495  message("\nTTQuantiSH::getVaWithDominance in patch %i; size = %i\n", patch->getID(), size);
5496 #endif
5497 
5498  if(!size)
5499  return vector<double>(_num_trait, -1.0);
5500 
5501 
5502  //compute the allele frequencies:
5503  vector< double > freqs = getSNPalleleFreqInPatch(patch, AGE); //it has num locus x num traits elements, in a 1D array
5504 
5505  unsigned int numLocus, pos, a1, a2;
5506  TTQuanti* trait;
5507  const TMatrix& allele_value = _SHLinkedTrait->get_diallele_values(); // nlocus x 2
5508 
5509  double G, meanG;
5510  vector< double > genotypeValues[3];
5511  vector< double > genotypeFreq[3];
5512 
5513  double *genot = new double[size];
5514 
5515  vector< double > varA(_num_trait, 0.0);
5516 
5518  for(unsigned int TRAIT = 0; TRAIT < _num_trait; ++TRAIT)
5519  {
5520 
5521  numLocus = _SHLinkedTrait->get_num_locus(TRAIT);
5522 
5523  meanG = 0;
5524 
5525  genotypeValues[0].assign(numLocus, 0.0); //AA
5526  genotypeValues[1].assign(numLocus, 0.0); //Aa/aA
5527  genotypeValues[2].assign(numLocus, 0.0); //aa
5528 
5529  genotypeFreq[0].assign(numLocus, 0.0); //AA
5530  genotypeFreq[1].assign(numLocus, 0.0); //Aa/aA
5531  genotypeFreq[2].assign(numLocus, 0.0); //aa
5532 
5533  for(unsigned int l = 0, locID; l < numLocus; ++l)
5534  {
5535  locID = _SHLinkedTrait->get_locus_ID(l, TRAIT);
5536  genotypeValues[0][l] = _SHLinkedTrait->get_genotype_with_dominance( allele_value.get(locID,0), allele_value.get(locID,0), locID, TRAIT);
5537  genotypeValues[1][l] = _SHLinkedTrait->get_genotype_with_dominance( allele_value.get(locID,0), allele_value.get(locID,1), locID, TRAIT);
5538  genotypeValues[2][l] = _SHLinkedTrait->get_genotype_with_dominance( allele_value.get(locID,1), allele_value.get(locID,1), locID, TRAIT);
5539  }
5540 
5541  // cycle trhough all individuals:
5542 
5543  Individual* curInd;
5544  unsigned int gpos = 0, fpos = 0;
5545 
5546  for(unsigned int s = 0; s < 2; ++s) {
5547  for(unsigned int i = 0; i < patch->size(sex_t(s), AGE) && gpos < size; ++i )
5548  {
5549  curInd = patch->get(sex_t(s), AGE, i);
5550 
5551  trait = dynamic_cast<TTQuanti*>(curInd->getTrait(_SHLinkedTraitIndex));
5552 
5553  G = trait->get_full_genotype(TRAIT); // genotype value
5554 
5555  meanG += G;
5556 
5557  genot[gpos++] = G;
5558 
5559  for(unsigned int l = 0; l < numLocus; ++l)
5560  {
5561  pos = _SHLinkedTrait->get_locus_seq_pos(l, TRAIT); //l * _num_trait + TRAIT;
5562 
5563  a1 = trait->get_allele_bit(pos, 0);
5564  a2 = trait->get_allele_bit(pos, 1);
5565 
5566  fpos = a1 + a2; //which genotype: 0 = AA, 1 = Aa/aA, 2 = aa
5567 
5568  genotypeFreq[fpos][l]++;
5569 
5570  // if( genotypeValues[fpos][l] != _SHLinkedTrait->get_genotype_with_dominance( genes[0][pos], genes[1][pos], locID, TRAIT))
5571  // {
5572  // cout << "assert failure: genot table value: "<<genotypeValues[fpos][l]<<" at "<<fpos
5573  // <<"; genot value: "<<_SHLinkedTrait->get_genotype_with_dominance( genes[0][pos], genes[1][pos], locID, TRAIT)
5574  // <<" ("<< genes[0][pos]<<", "<< genes[1][pos] <<", "<<_SHLinkedTrait->get_dominance(locID, TRAIT)<<")\n";
5575  // }
5576  }
5577 
5578 
5579  } // for each female
5580  }
5581 
5582  assert(gpos == size);
5583 
5584  meanG /= size;
5585 
5586  // record the genotypic variance in the stater, will be needed to comput Ve
5587  _Vg[TRAIT] = my_variance_with_fixed_mean(genot, size, meanG);
5588 
5589  for(unsigned int l = 0; l < numLocus; ++l)
5590  {
5591  genotypeFreq[0][l] /= size;
5592  genotypeFreq[1][l] /= size;
5593  genotypeFreq[2][l] /= size;
5594  }
5595 
5596 
5597  // compute the average excess (alphaStar) which is identical to the additive effects under random mating
5598 
5599  // !!! THIS DOESN'T WORK AT ALL !!!
5600 
5601 // vector< double > alphaStar[2];
5602 // alphaStar[0].assign(_num_locus, 0.0);
5603 // alphaStar[1].assign(_num_locus, 0.0);
5604 //
5605 // double mean_alpha = 0;
5606 //
5607 // for(unsigned int l = 0; l < _num_locus; ++l)
5608 // {
5609 //
5610 // pos = l * _num_trait + TRAIT;
5611 //
5612 // // average excess of each allele; the frequency table contains the frequency of the first allele only
5613 // // here, we condition on the genotype being present in the population, in case HW equilibrium is not reached
5614 // // eq 4.13b Lynch & Walsh 98
5615 // // allele frequency freq[pos] is that of the first allele at [0]
5616 // alphaStar[0][l] = genotypeValues[1][l] * (1.0 - freqs[pos]) + genotypeValues[0][l] * freqs[pos] - meanG; // alpha*_1
5617 //
5618 // alphaStar[1][l] = genotypeValues[1][l] * freqs[pos] + genotypeValues[2][l] * (1.0-freqs[pos]) - meanG; // alpha*_2
5619 //
5623 //
5624 // mean_alpha += (alphaStar[0][l] + alphaStar[1][l])/2;
5625 //
5626 // varA[TRAIT] += alphaStar[0][l]*alphaStar[0][l]*freqs[pos] + alphaStar[1][l]*alphaStar[1][l]*(1-freqs[pos]); // SUM(p_i*alpha_i^2)
5627 //
5628 // }
5629 // varA[TRAIT] *= 2; // for diploids
5630 //
5631 // cout <<"TTQuantiSH::getVaWithDominance:: Va = "<<varA[TRAIT]<< " (mean alpha = "<<mean_alpha/_num_locus<<")"<<endl;
5632 
5633 
5634  // check form general formula Va = 2pq[a + d(q-p)]^2 !! q here is 1-freqs[pos], freq of smaller allele (reducing value) which has index [1]
5635  double Vacheck = 0, a, d,avG, VDcheck = 0, vd, p, q, pq;
5636  for(unsigned int l = 0; l < numLocus; ++l)
5637  {
5638  // the freq vector has same arrangement of loci as the quanti sequence in the genome
5639  pos = _SHLinkedTrait->get_locus_seq_pos(l, TRAIT);
5640  p = freqs[pos];
5641  q = 1 - freqs[pos];
5642  pq= p*q;
5643  a = abs(genotypeValues[0][l] - genotypeValues[2][l])/2.0;
5644  d = genotypeValues[1][l];
5645  avG = a + d*(1-2*p); //'freqs' stores 'p' not 'q', at same location in the array as loci in the sequences
5646  Vacheck += 2*pq*avG*avG;
5647  vd = 2*pq*d;
5648  VDcheck += vd*vd;
5649  }
5650 
5652  varA [TRAIT] = _Vg[TRAIT];
5653  else
5654  varA[TRAIT] = Vacheck;
5655 
5656 #ifdef _DEBUG_
5657  message("TTQuantiSH::getVaWithDominance:: mean genotype = %d\n", meanG);
5658  message("TTQuantiSH::getVaWithDominance:: var genotype Vg = %d\n",_Vg[TRAIT]);
5659  message("TTQuantiSH::getVaWithDominance:: estimates: Va = %d, Vd = %d, Vg = %d\n", Vacheck, VDcheck, Vacheck+VDcheck);
5660 #endif
5661 
5662  } //for each trait
5663 
5664  delete [] genot;
5665 
5666  return varA;
5667 }
unsigned int get_locus_ID(unsigned int locus, unsigned int trait)
Definition: ttquanti.h:454
unsigned int get_locus_seq_pos(unsigned int loc, unsigned int trait)
Definition: ttquanti.h:452
unsigned int get_num_locus()
Definition: ttquanti.h:423
bool get_h2_isBroad()
Definition: ttquanti.h:432
double get_genotype_with_dominance(const double a1, const double a2, const unsigned int locus, const unsigned int trait)
Definition: ttquanti.cc:2538
virtual double get_full_genotype(unsigned int trait)=0

References _num_trait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, _Vg, fatal(), Patch::get(), TMatrix::get(), TTQuanti::get_allele_bit(), TProtoQuanti::get_allele_model(), TProtoQuanti::get_diallele_values(), TTQuanti::get_full_genotype(), TProtoQuanti::get_genotype_with_dominance(), TProtoQuanti::get_h2_isBroad(), TProtoQuanti::get_locus_ID(), TProtoQuanti::get_locus_seq_pos(), TProtoQuanti::get_num_locus(), Patch::getID(), getSNPalleleFreqInPatch(), Individual::getTrait(), message(), my_variance_with_fixed_mean(), and Patch::size().

Referenced by LCE_QuantiModifier::setParameters(), and LCE_Breed_Quanti::setParameters().

+ Here is the caller graph for this function:

◆ getVb()

double TTQuantiSH::getVb ( unsigned int  i)
inline
785 {return _Vb[i];}

References _Vb.

Referenced by addQuanti().

+ Here is the caller graph for this function:

◆ getVg()

double TTQuantiSH::getVg ( unsigned int  i)
inline
784 {return _Vg[i];}

References _Vg.

Referenced by LCE_QuantiModifier::setVefromVa().

+ Here is the caller graph for this function:

◆ getVp()

double TTQuantiSH::getVp ( unsigned int  i)
inline
786 {return _Vp[i];}

References _Vp.

Referenced by addQuanti().

+ Here is the caller graph for this function:

◆ getVpPerPatch()

double TTQuantiSH::getVpPerPatch ( unsigned int  i,
unsigned int  p 
)
inline
793 {return _pVp[i][p];}

References _pVp.

Referenced by addVarPerPatch().

+ Here is the caller graph for this function:

◆ init()

void TTQuantiSH::init ( )
virtual

Reimplemented from StatHandlerBase.

4601 {
4603 
4605 
4606  _eVar = (!_SHLinkedTrait->get_env_var().empty() || !_SHLinkedTrait->get_heritability().empty());
4607 
4608  resetPtrs(); //deallocate anything that was previously allocated
4609 
4610  if(_patchNbr != _pop->getPatchNbr())
4611  _patchNbr = _pop->getPatchNbr();
4612 
4615 
4618 
4619  _meanP = new double [_num_trait];
4620  _meanG = new double [_num_trait];
4621  _Va = new double [_num_trait];
4622  _Vg = new double [_num_trait];
4623  _Vb = new double [_num_trait];
4624  _Vp = new double [_num_trait];
4625 
4626  _pVa = new double* [_num_trait];
4627  _pVp = new double* [_num_trait];
4628  _pmeanP = new double* [_num_trait];
4629  _pmeanG = new double* [_num_trait];
4630 
4631  for(unsigned int i=0; i < _num_trait; ++i) {
4632 
4633  _pVa[i] = new double [_patchNbr];
4634  _pVp[i] = new double [_patchNbr];
4635  _pmeanP[i] = new double [_patchNbr];
4636  _pmeanG[i] = new double [_patchNbr];
4637 
4638  }
4639 
4640  if(_num_trait > 1) {
4641 
4642  _G = gsl_matrix_alloc(_num_trait,_num_trait);
4643  _eval = gsl_vector_alloc (_num_trait);
4644  _evec = gsl_matrix_alloc (_num_trait, _num_trait);
4645  _ws = gsl_eigen_symmv_alloc (_num_trait);
4646 
4647  _peigval = new double* [_num_trait];
4648 // _eigvect = new double* [_num_trait];
4649 
4650  for(unsigned int i=0; i < _num_trait; ++i) {
4651 // _eigvect[i] = new double [_num_trait];
4652  _peigval[i] = new double [_patchNbr];
4653  }
4654 
4655  _peigvect = new double* [_patchNbr];
4656 
4657  for(unsigned int i = 0; i < _patchNbr; i++)
4658  _peigvect[i] = new double [_num_trait*_num_trait];
4659 
4660  _covar = new double [_num_trait*(_num_trait -1)/2];
4661 
4662  _pcovar = new double* [_num_trait*(_num_trait - 1)/2];
4663 
4664  for(unsigned int i = 0; i < _num_trait*(_num_trait - 1)/2; i++)
4665  _pcovar[i] = new double [_patchNbr];
4666 
4667  }
4668 
4669 }
int getTraitIndex(trait_t type)
Gives the index of trait with type.
Definition: indfactory.cc:127
virtual void init()
Definition: stathandler.cc:38
vector< double > get_heritability()
Definition: ttquanti.h:430
virtual trait_t get_type() const
Definition: ttquanti.h:575
unsigned int get_num_traits()
Definition: ttquanti.h:422
vector< double > get_env_var()
Definition: ttquanti.h:429

References _covar, _eval, _eVar, _evec, _G, _meanG, _meanP, _num_locus, _num_trait, _patchNbr, _pcovar, _peigval, _peigvect, _pmeanG, _pmeanP, StatHandlerBase::_pop, _pVa, _pVp, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, _Va, _Vb, _Vg, _Vp, _ws, TProtoQuanti::get_env_var(), TProtoQuanti::get_heritability(), TProtoQuanti::get_num_locus(), TProtoQuanti::get_num_traits(), TProtoQuanti::get_type(), Metapop::getPatchNbr(), IndFactory::getTraitIndex(), StatHandlerBase::init(), and resetPtrs().

◆ resetPtrs()

void TTQuantiSH::resetPtrs ( )
4543 {
4544 
4545  if(_G) gsl_matrix_free(_G);
4546  if(_eval) gsl_vector_free(_eval);
4547  if(_evec) gsl_matrix_free(_evec);
4548  if(_ws) gsl_eigen_symmv_free (_ws);
4549 
4550  if(_meanP) delete [] _meanP; _meanP = NULL;
4551  if(_meanG) delete [] _meanG; _meanG = NULL;
4552  if(_Va) delete [] _Va; _Va = NULL;
4553  if(_Vg) delete [] _Vg; _Vg = NULL;
4554  if(_Vb) delete [] _Vb; _Vb = NULL;
4555  if(_Vp) delete [] _Vp; _Vp = NULL;
4556 
4557 
4558  if(_pVa) {
4559  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pVa[i];
4560  delete [] _pVa; _pVa = NULL;
4561  }
4562  if(_pVp) {
4563  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pVp[i];
4564  delete [] _pVp; _pVp = NULL;
4565  }
4566  if(_pmeanP) {
4567  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pmeanP[i];
4568  delete [] _pmeanP; _pmeanP = NULL;
4569  }
4570  if(_pmeanG) {
4571  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pmeanG[i];
4572  delete [] _pmeanG; _pmeanG = NULL;
4573  }
4574 
4575  if(_peigval) {
4576  for(unsigned int i=0; i < _num_trait; ++i) delete [] _peigval[i];
4577  delete [] _peigval;
4578  _peigval = NULL;
4579  }
4580 
4581  if(_covar) delete [] _covar;
4582  _covar = NULL;
4583 
4584  if(_pcovar) {
4585  for(unsigned int i = 0; i < (_num_trait*(_num_trait - 1)/2); i++) delete [] _pcovar[i];
4586  delete [] _pcovar;
4587  _pcovar = NULL;
4588  }
4589 
4590  if(_peigvect) {
4591  for(unsigned int i = 0; i < _patchNbr; i++) delete [] _peigvect[i];
4592  delete [] _peigvect;
4593  _peigvect = NULL;
4594  }
4595 
4596 }

References _covar, _eval, _evec, _G, _meanG, _meanP, _num_trait, _patchNbr, _pcovar, _peigval, _peigvect, _pmeanG, _pmeanP, _pVa, _pVp, _Va, _Vb, _Vg, _Vp, and _ws.

Referenced by init(), and ~TTQuantiSH().

+ Here is the caller graph for this function:

◆ setAdultStats()

void TTQuantiSH::setAdultStats ( )
inline
778 {setStats(ADULTS);}
void setStats(age_t AGE)
Definition: ttquanti.cc:5223

References ADULTS, and setStats().

Referenced by addAvgPerPatch(), addCovarPerPatch(), addEigenPerPatch(), addEigenValuesPerPatch(), addEigenVect1PerPatch(), addGenotPerPatch(), addQuanti(), addSkewPerPatch(), and addVarPerPatch().

+ Here is the caller graph for this function:

◆ setDataTables()

void TTQuantiSH::setDataTables ( age_t  AGE)
5153 {
5154  unsigned int **sizes;
5155  unsigned int nb_patch = _pop->getPatchNbr();
5156 
5157  sizes = new unsigned int * [_num_trait];
5158 
5159  for(unsigned int i = 0; i < _num_trait; ++i) {
5160  sizes[i] = new unsigned int [nb_patch];
5161  for(unsigned int j = 0; j < nb_patch; ++j)
5162  sizes[i][j] = _pop->size(AGE, j);
5163  }
5164 
5165  _phenoTable.update(_num_trait, nb_patch, sizes);
5166  _genoTable.update(_num_trait, nb_patch, sizes);
5167 
5168  for(unsigned int i = 0; i < _num_trait; ++i)
5169  delete [] sizes[i];
5170  delete [] sizes;
5171 
5172  Patch* patch;
5173  age_idx age = (AGE == ADULTS ? ADLTx : OFFSx);
5174 
5175  for(unsigned int i = 0, n; i < nb_patch; i++) {
5176 
5177  patch = _pop->getPatch(i);
5178 
5179  n = 0;
5180 
5181  if ((patch->size(MAL, age)+patch->size(FEM, age)) != _phenoTable.size(0,i)) {
5182  fatal("problem while recording quanti trait values; table size doesn't match patch size.\n");
5183  }
5184 
5185  store_quanti_trait_values(patch, i, patch->size(MAL, age), &n, MAL, age, &_phenoTable, &_genoTable,
5187 
5188  store_quanti_trait_values(patch, i, patch->size(FEM, age), &n, FEM, age, &_phenoTable, &_genoTable,
5190 
5191  if (n != _phenoTable.size(0,i) || n != _genoTable.size(0,i)) {
5192  fatal("problem while recording quanti trait values; size counter doesn't match table size.\n");
5193  }
5194  } // end for patches
5195 }
void update(unsigned int nbgroups, unsigned int nbclasses, unsigned int **classSizes)
Updates the group and classe sizes and re-allocates the table according to its new length.
Definition: datatable.h:153
unsigned int size()
Get the total number of individuals present in the population, all sex and age classes together.
Definition: metapop.h:311
Patch * getPatch(unsigned int i)
Patch accessor, return the ith+1 patch in the metapop.
Definition: metapop.h:256
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:431
DataTable< double > _genoTable
Definition: ttquanti.h:745
void store_quanti_trait_values(Patch *patch, unsigned int patchID, unsigned int size, unsigned int *cntr, sex_t SEX, age_idx AGE, DataTable< double > *ptable, DataTable< double > *gtable, unsigned int nTrait, unsigned int TraitIndex)
Definition: ttquanti.cc:5199
age_idx
Array index of the age classes in the patch sizes and containers arrays.
Definition: types.h:40
@ OFFSx
Definition: types.h:41
@ ADLTx
Definition: types.h:41

References _genoTable, _num_trait, _phenoTable, StatHandlerBase::_pop, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, ADLTx, ADULTS, fatal(), FEM, Metapop::getPatch(), Metapop::getPatchNbr(), MAL, OFFSx, Metapop::size(), Patch::size(), DataTable< T >::size(), store_quanti_trait_values(), and DataTable< T >::update().

Referenced by setStats().

+ Here is the caller graph for this function:

◆ setOffsprgStats()

void TTQuantiSH::setOffsprgStats ( )
inline

◆ setStatRecorders()

bool TTQuantiSH::setStatRecorders ( std::string &  token)
virtual

Implements StatHandlerBase.

4674 {
4675 #ifdef _DEBUG_
4676  message("-TTQuantiSH::setStatRecorders ");
4677 #endif
4678  string age_tag = token.substr(0,token.find_first_of("."));
4679  string sub_token;
4680  age_t AGE = ALL;
4681 
4682  if (age_tag.size() != 0 && age_tag.size() != string::npos) {
4683 
4684  if (age_tag == "adlt") AGE = ADULTS;
4685 
4686  else if (age_tag == "off") AGE = OFFSPRG;
4687 
4688  else age_tag = "";
4689 
4690  } else {
4691  age_tag = "";
4692  }
4693 
4694  if (age_tag.size() != 0)
4695  sub_token = token.substr(token.find_first_of(".") + 1, string::npos);
4696  else
4697  sub_token = token;
4698 
4699  if(sub_token == "quanti") {
4700  addQuanti(AGE);
4701  } else if(sub_token == "quanti.patch") {
4702  addQuantiPerPatch(AGE);
4703  } else if(sub_token == "quanti.mean.patch") {
4704  addAvgPerPatch(AGE);
4705  } else if(sub_token == "quanti.pheno.patch") { // same as quanti.mean.patch
4706  addAvgPerPatch(AGE);
4707  } else if(sub_token == "quanti.geno.patch") {
4708  addGenotPerPatch(AGE);
4709  } else if(sub_token == "quanti.var.patch") {
4710  addVarPerPatch(AGE);
4711  } else if(sub_token == "quanti.covar.patch") {
4712  addCovarPerPatch(AGE);
4713  } else if(sub_token == "quanti.eigen.patch") {
4714  addEigenPerPatch(AGE);
4715  } else if(sub_token == "quanti.eigenvalues.patch") {
4717  } else if(sub_token == "quanti.eigenvect1.patch") {
4718  addEigenVect1PerPatch(AGE);
4719  } else if(sub_token == "quanti.skew.patch") {
4720  addSkewPerPatch(AGE);
4721 // } else if((sub_token == "quanti.epistasis") && (_SHLinkedTrait->do_epistasis())) {
4722 // addQuantiEpistasis(AGE);
4723 // _epistats = true;
4724 // } else if(sub_token == "quanti.effect.stats") {
4725 // addEffectStats(AGE);
4726 // _alleleStats = true;
4727  } else
4728  return false;
4729 
4730  return true;
4731 }
unsigned int age_t
Age class flags.
Definition: types.h:45

References addAvgPerPatch(), addCovarPerPatch(), addEigenPerPatch(), addEigenValuesPerPatch(), addEigenVect1PerPatch(), addGenotPerPatch(), addQuanti(), addQuantiPerPatch(), addSkewPerPatch(), addVarPerPatch(), ADULTS, ALL, message(), and OFFSPRG.

◆ setStats()

void TTQuantiSH::setStats ( age_t  AGE)
5224 {
5225  if(_table_set_age == AGE
5228  return;
5229 
5230  unsigned int pop_size = _pop->size(AGE);
5231  unsigned int patch_size;
5232  double *phenot1, *genot1, *genot2;
5233 
5234  unsigned int nb_patch = _pop->getPatchNbr();
5235 
5236  if(nb_patch < _patchNbr) {
5237  warning("increase in patch number detected (in Quanti Stat Handler),");
5238  warning("stats for quanti trait will not be recorded in new patches, patch identity may have changed.\n");
5239  _patchNbr = nb_patch; // record stat only in remaining patches
5240  }
5241 
5242  if(nb_patch > _patchNbr) nb_patch = _patchNbr; //tables have been allocated for _patchNbr patches
5243 
5244  setDataTables(AGE);
5245 
5246 #ifdef HAS_GSL
5247  unsigned int c = 0; //covariance position counter
5248  unsigned int pv = 0; //eigenvector position counter
5249 
5250  //within deme stats:
5251  for(unsigned int j = 0; j < nb_patch; j++) {
5252 
5253  patch_size = _pop->size(AGE, j);
5254 
5255  for(unsigned int t=0; t < _num_trait; t++) {
5256 
5257  phenot1 = _phenoTable.getClassWithinGroup(t,j);
5258  genot1 = _genoTable.getClassWithinGroup(t,j);
5259 
5260  _pmeanP[t][j] = my_mean (phenot1, patch_size );
5261  _pmeanG[t][j] = my_mean (genot1, patch_size );
5262  _pVp[t][j] = my_variance_with_fixed_mean (phenot1, patch_size, _pmeanP[t][j]);
5263  _pVa[t][j] = my_variance_with_fixed_mean (genot1, patch_size, _pmeanG[t][j]);
5264 
5265  }
5266 
5267  if(_num_trait > 1) {
5268  c = 0;
5269  // calculate the covariances and G, need to adjust dimensions in class declaration
5270  for(unsigned int t1 = 0; t1 < _num_trait; t1++) {
5271  // set the diagonal elements of G here
5272 
5273  gsl_matrix_set(_G, t1, t1, _pVa[t1][j]);
5274 
5275  for(unsigned int t2 = t1 + 1; t2 < _num_trait; t2++) {
5276 
5277  genot1 = _genoTable.getClassWithinGroup(t1,j);
5278  genot2 = _genoTable.getClassWithinGroup(t2,j);
5279 
5280  _pcovar[c][j] = gsl_stats_covariance_m (genot1, 1, genot2, 1, patch_size,
5281  _pmeanG[t1][j], _pmeanG[t2][j]);
5282 
5283  gsl_matrix_set(_G, t1, t2, _pcovar[c][j]);
5284  gsl_matrix_set(_G, t2, t1, _pcovar[c++][j]);
5285  }
5286  }
5287 
5288  gsl_eigen_symmv (_G, _eval, _evec, _ws);
5289  gsl_eigen_symmv_sort (_eval, _evec, GSL_EIGEN_SORT_VAL_DESC);
5290 
5291  pv = 0;
5292 
5293  for(unsigned int t = 0; t < _num_trait; t++) {
5294  _peigval[t][j] = gsl_vector_get (_eval, t);
5295  for(unsigned int v = 0; v < _num_trait; v++)
5296  _peigvect[j][pv++] = gsl_matrix_get (_evec, v, t); //read eigenvectors column-wise
5297  }
5298  }
5299  } //_end_ for patch
5300 
5301  double meanGamong1;
5302  c = 0; //reset covariance positioner
5303 
5304  //among demes stats:
5305  for(unsigned int t1 = 0; t1 < _num_trait; t1++) {
5306 
5307  phenot1 = _phenoTable.getGroup(t1);
5308  genot1 = _genoTable.getGroup(t1);
5309 
5310  _meanP[t1] = my_mean (phenot1, pop_size ); //grand mean, pooling all individuals
5311  _meanG[t1] = my_mean (genot1, pop_size ); //grand mean, pooling all individuals
5312 
5313  _Vp[t1] = my_mean_no_nan (_pVp[t1], nb_patch); //mean within patch variance
5314  _Va[t1] = my_mean_no_nan (_pVa[t1], nb_patch); //mean within patch variance
5315 
5316  meanGamong1 = my_mean_no_nan (_pmeanG[t1], nb_patch); //mean of within patch mean genotypic values
5317 
5318  _Vb[t1] = my_variance_with_fixed_mean_no_nan (_pmeanG[t1], nb_patch, meanGamong1); //variance of patch means
5319 
5320  for(unsigned int t2 = t1 + 1; t2 < _num_trait; t2++) {
5321 
5322  _covar[c] = my_covariance_no_nan(_pmeanG[t1], _pmeanG[t2], nb_patch, nb_patch);
5323 
5324  //set covariance to the mean covariance within patch for recording
5325  _covar[c] = my_mean_no_nan (_pcovar[c], nb_patch);
5326 
5327  c++;
5328  }
5329 
5330  } //_end_ for trait
5331 
5332 #else
5333  fatal("install the GSL library to get the quanti stats!\n");
5334 #endif
5335 
5336  _table_set_age = AGE;
5339 
5340 }
T * getGroup(unsigned int group)
Accessor to a group array.
Definition: datatable.h:222
unsigned int getCurrentReplicate()
Definition: metapop.h:294
unsigned int getCurrentGeneration()
Definition: metapop.h:295
void setDataTables(age_t AGE)
Definition: ttquanti.cc:5152
double my_variance_with_fixed_mean_no_nan(double *data, unsigned int size, double mean)
Definition: utils.cc:73
double my_mean(double *data, unsigned int size)
Definition: utils.cc:37
double my_mean_no_nan(double *data, unsigned int size)
Definition: utils.cc:48
double my_covariance_no_nan(double *data1, double *data2, unsigned int size1, unsigned int size2)
Definition: utils.cc:87

References _covar, _eval, _evec, _G, _genoTable, _meanG, _meanP, _num_trait, _patchNbr, _pcovar, _peigval, _peigvect, _phenoTable, _pmeanG, _pmeanP, StatHandlerBase::_pop, _pVa, _pVp, _table_set_age, _table_set_gen, _table_set_repl, _Va, _Vb, _Vp, _ws, fatal(), DataTable< T >::getClassWithinGroup(), Metapop::getCurrentGeneration(), Metapop::getCurrentReplicate(), DataTable< T >::getGroup(), Metapop::getPatchNbr(), my_covariance_no_nan(), my_mean(), my_mean_no_nan(), my_variance_with_fixed_mean(), my_variance_with_fixed_mean_no_nan(), setDataTables(), Metapop::size(), and warning().

Referenced by setAdultStats(), and setOffsprgStats().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _covar

double * TTQuantiSH::_covar
private

Referenced by getCovar(), init(), resetPtrs(), and setStats().

◆ _eval

gsl_vector* TTQuantiSH::_eval
private

Referenced by init(), resetPtrs(), and setStats().

◆ _eVar

bool TTQuantiSH::_eVar
private

Referenced by addQuanti(), addVarPerPatch(), and init().

◆ _evec

gsl_matrix * TTQuantiSH::_evec
private

Referenced by init(), resetPtrs(), and setStats().

◆ _G

gsl_matrix* TTQuantiSH::_G
private

Referenced by init(), resetPtrs(), and setStats().

◆ _genoTable

DataTable< double > TTQuantiSH::_genoTable
private

Referenced by setDataTables(), and setStats().

◆ _meanG

double * TTQuantiSH::_meanG
private

◆ _meanP

double* TTQuantiSH::_meanP
private

◆ _num_locus

unsigned int TTQuantiSH::_num_locus
private

Referenced by getVaNoDominance(), and init().

◆ _num_trait

◆ _patchNbr

unsigned int TTQuantiSH::_patchNbr
private

Referenced by init(), resetPtrs(), and setStats().

◆ _pcovar

double ** TTQuantiSH::_pcovar
private

◆ _peigval

double ** TTQuantiSH::_peigval
private

◆ _peigvect

double ** TTQuantiSH::_peigvect
private

◆ _phenoTable

DataTable< double > TTQuantiSH::_phenoTable
private

◆ _pmeanG

double ** TTQuantiSH::_pmeanG
private

◆ _pmeanP

double** TTQuantiSH::_pmeanP
private

◆ _pVa

double ** TTQuantiSH::_pVa
private

◆ _pVp

double ** TTQuantiSH::_pVp
private

◆ _table_set_age

unsigned int TTQuantiSH::_table_set_age
private

Referenced by setStats().

◆ _table_set_gen

unsigned int TTQuantiSH::_table_set_gen
private

Referenced by setStats().

◆ _table_set_repl

unsigned int TTQuantiSH::_table_set_repl
private

Referenced by setStats().

◆ _Va

double * TTQuantiSH::_Va
private

Referenced by getQst(), getVa(), init(), resetPtrs(), and setStats().

◆ _Vb

double * TTQuantiSH::_Vb
private

Referenced by getQst(), getVb(), init(), resetPtrs(), and setStats().

◆ _Vg

double * TTQuantiSH::_Vg
private

◆ _Vp

double * TTQuantiSH::_Vp
private

Referenced by getVp(), init(), resetPtrs(), and setStats().

◆ _ws

gsl_eigen_symmv_workspace* TTQuantiSH::_ws
private

Referenced by init(), resetPtrs(), and setStats().


The documentation for this class was generated from the following files:

Generated for Nemo v2.4.1 by  doxygen 1.9.1

Catalogued on GSR