Nemo  2.4.0
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:4544

References resetPtrs().

Member Function Documentation

◆ addAvgPerPatch()

void TTQuantiSH::addAvgPerPatch ( age_t  AGE)
4823 {
4824  if (AGE == ALL) {
4827  return;
4828  }
4829 
4830  unsigned int patchNbr = _pop->getPatchNbr();
4831 
4832  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4833  string name;
4834  string patch;
4835  string t1;
4836 
4837  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4839 
4840  add("Mean phenotype of trait 1 in patch 1", suffix + "q1.p1", AGE, 0, 0, 0, 0,
4842 
4843  for(unsigned int p = 0; p < patchNbr; p++) {
4844  for(unsigned int i = 0; i < _num_trait; i++) {
4845  if(p == 0 && i == 0) continue;
4846  name = "Mean phenotype of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4847  t1 = "q" + tstring::int2str(i+1);
4848  patch = ".p" + tstring::int2str(p+1);
4849  add(name, suffix + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getMeanPhenotPerPatch, 0);
4850  }
4851  }
4852 
4853 }
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:4822
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)
4946 {
4947  if(_num_trait < 2) {
4948  // warning("not recording traits covariance with only one \"quanti\" trait!");
4949  return;
4950  }
4951 
4952  if (AGE == ALL) {
4955  return;
4956  }
4957 
4958  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4959  string patch;
4960  string cov;
4961  unsigned int patchNbr = _pop->getPatchNbr();
4962 
4963  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4965 
4966  add("Genetic covariance of trait 1 and trait 2 in patch 1", suffix + "cov.q12.p1", AGE, 0, 0, 0, 0,
4967  &TTQuantiSH::getCovarPerPatch, setter);
4968 
4969  unsigned int c;
4970  for(unsigned int p = 0; p < patchNbr; p++) {
4971  patch = ".p" + tstring::int2str(p+1);
4972  c = 0;
4973  for(unsigned int t = 0; t < _num_trait; ++t) {
4974  for(unsigned int v = t + 1; v < _num_trait; ++v){
4975  if(p==0 && t==0 && v==1) {c++; continue;} //this on is already recorder above
4976  cov = tstring::int2str((t+1)*10+v+1);
4977  add("", suffix + "cov.q" + cov + patch, AGE, c++, p, 0, 0, &TTQuantiSH::getCovarPerPatch, 0);
4978  }
4979  }
4980  }
4981 
4982 }
void addCovarPerPatch(age_t AGE)
Definition: ttquanti.cc:4945
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)
4987 {
4988  if(_num_trait < 2) {
4989  warning("not recording G-matrix eigen stats with only one \"quanti\" trait!\n");
4990  return;
4991  }
4992 
4993  if (AGE == ALL) {
4996  return;
4997  }
4998 
4999  unsigned int patchNbr = _pop->getPatchNbr();
5000  string suffix = (AGE == ADULTS ? "adlt.":"off.");
5001  string patch;
5002  unsigned int pv =0;
5003 
5004  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
5006 
5007 
5008  add("First G-matrix eigenvalue in patch 1", suffix + "qeval1.p1", AGE, 0, 0, 0, 0,
5010 
5011  for(unsigned int p = 0; p < patchNbr; ++p) {
5012  patch = ".p" + tstring::int2str(p+1);
5013  for(unsigned int t = 0; t < _num_trait; ++t) {
5014  if(p==0 && t==0) continue;
5015  add("", suffix + "qeval" + tstring::int2str(t+1) + patch, AGE, t, p, 0, 0, &TTQuantiSH::getEigenValuePerPatch,0);
5016  }
5017  }
5018  for(unsigned int p = 0; p < patchNbr; ++p) {
5019  patch = ".p" + tstring::int2str(p+1);
5020  pv = 0;
5021  for(unsigned int t = 0; t < _num_trait; ++t)
5022  for(unsigned int v = 0; v < _num_trait; ++v)
5023  add("", suffix + "qevect" + tstring::int2str((t+1)*10+v+1) + patch, AGE, p, pv++, 0, 0, &TTQuantiSH::getEigenVectorEltPerPatch,0);
5024  }
5025 
5026 }
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:4986
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)
5031 {
5032  if(_num_trait < 2) {
5033  warning("not recording G-matrix eigen stats with only one \"quanti\" trait!\n");
5034  return;
5035  }
5036 
5037  if (AGE == ALL) {
5040  return;
5041  }
5042 
5043  unsigned int patchNbr = _pop->getPatchNbr();
5044  string suffix = (AGE == ADULTS ? "adlt.":"off.");
5045  string patch;
5046 
5047  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
5049 
5050  add("First G-matrix eigenvalue in patch 1", suffix + "qeval1.p1", AGE, 0, 0, 0, 0,
5052 
5053  for(unsigned int p = 0; p < patchNbr; ++p) {
5054  patch = ".p" + tstring::int2str(p+1);
5055  for(unsigned int t = 0; t < _num_trait; ++t) {
5056  if(p==0 && t==0) continue;
5057  add("", suffix + "qeval" + tstring::int2str(t+1) + patch, AGE, t, p, 0, 0, &TTQuantiSH::getEigenValuePerPatch,0);
5058  }
5059  }
5060 }
void addEigenValuesPerPatch(age_t AGE)
Definition: ttquanti.cc:5030

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

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

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)
4738 {
4739  if (AGE == ALL) {
4740  addQuanti(ADULTS);
4741  addQuanti(OFFSPRG);
4742  return;
4743  }
4744 
4745  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4746  string name = suffix + "q";
4747  string t1, t2;
4748 
4749  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4751 
4752  add("",suffix + "q1",AGE,0,0,0,&TTQuantiSH::getMeanPhenot,0,setter);
4753 
4754  for(unsigned int i = 1; i < _num_trait; i++) {
4755  t1 = tstring::int2str(i+1);
4756  add("", name + t1,AGE,i,0,0,&TTQuantiSH::getMeanPhenot,0,0);
4757  }
4758 
4759  //Va, no dominance, no epistasis
4761  for(unsigned int i = 0; i < _num_trait; i++) {
4762  t1 = tstring::int2str(i+1);
4763  add("", name + t1 +".Va",AGE,i,0,0,&TTQuantiSH::getVa,0,0);
4764  }
4765  } else {
4766  //if dominance or epistasis, then what we record is Vg, not Va
4767  for(unsigned int i = 0; i < _num_trait; i++) {
4768  t1 = tstring::int2str(i+1);
4769  add("", name + t1 +".Vg",AGE,i,0,0,&TTQuantiSH::getVa,0,0);
4770  }
4771  }
4772 
4773  //Vp
4774  if(_eVar) {
4775  for(unsigned int i = 0; i < _num_trait; i++) {
4776  t1 = tstring::int2str(i+1);
4777  add("", name + t1 +".Vp",AGE,i,0,0,&TTQuantiSH::getVp,0,0);
4778  }
4779  }
4780  //Vb
4781  if(_pop->getPatchNbr() > 1){
4782  for(unsigned int i = 0; i < _num_trait; i++) {
4783  t1 = tstring::int2str(i+1);
4784  add("", name + t1 +".Vb",AGE,i,0,0,&TTQuantiSH::getVb,0,0);
4785  }
4786  //Qst
4787  for(unsigned int i = 0; i < _num_trait; i++) {
4788  t1 = tstring::int2str(i+1);
4789  add("", name + t1 +".Qst",AGE,i,0,0,&TTQuantiSH::getQst,0,0);
4790  }
4791  }
4792 
4793  if (_num_trait > 1) {
4794  unsigned int c = 0;
4795  for(unsigned int t = 0; t < _num_trait; ++t) {
4796  for(unsigned int v = t + 1; v < _num_trait; ++v) {
4797  t1 = tstring::int2str((t+1)*10+(v+1));
4798  add("", name + t1 +".cov", AGE, c++, 0,0,&TTQuantiSH::getCovar,0,0);
4799  }
4800  }
4801  }
4802 }
bool do_epistasis()
Definition: ttquanti.h:566
unsigned int get_dominance_model()
Definition: ttquanti.h:477
void addQuanti(age_t AGE)
Definition: ttquanti.cc:4737
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)
4807 {
4808 
4809  if (AGE == ALL) {
4812  return;
4813  }
4814 
4815  addAvgPerPatch(AGE);
4816  addVarPerPatch(AGE);
4817  addCovarPerPatch(AGE);
4818 }
void addVarPerPatch(age_t AGE)
Definition: ttquanti.cc:4892
void addQuantiPerPatch(age_t AGE)
Definition: ttquanti.cc:4806

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

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)
4893 {
4894  if (AGE == ALL) {
4897  return;
4898  }
4899 
4900  unsigned int patchNbr = _pop->getPatchNbr();
4901 
4902  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4903  string name;
4904  string patch;
4905  string t1;
4906  string Vtype;
4907 
4908 
4910  Vtype = "Vg.";
4911  else
4912  Vtype = "Va.";
4913 
4914  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4917 
4918  add("Genetic variance of trait 1 in patch 1", suffix + Vtype + "q1.p1", AGE, 0, 0, 0, 0,
4919  &TTQuantiSH::getVaPerPatch, setter);
4920 
4921  for(unsigned int p = 0; p < patchNbr; p++) {
4922  for(unsigned int i = 0; i < _num_trait; i++) {
4923  if(p == 0 && i == 0) continue;
4924  name = "Genetic variance of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4925  t1 = "q" + tstring::int2str(i+1);
4926  patch = ".p" + tstring::int2str(p+1);
4927  add(name, suffix + Vtype + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getVaPerPatch, 0);
4928  }
4929  }
4930 
4931  if(_eVar) {
4932  for(unsigned int p = 0; p < patchNbr; p++) {
4933  for(unsigned int i = 0; i < _num_trait; i++) {
4934  name = "Phenotypic variance of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4935  t1 = "q" + tstring::int2str(i+1);
4936  patch = ".p" + tstring::int2str(p+1);
4937  add(name, suffix + "Vp." + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getVpPerPatch, 0);
4938  }
4939  }
4940  }
4941 }
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 
)
5140 {
5141  double skew = 0;
5142 
5143  double *phenot = _phenoTable.getClassWithinGroup(i, p);
5144  unsigned int patch_size = _phenoTable.size(i, p);
5145 
5146  for(unsigned int k = 0; k < patch_size; ++k)
5147  skew += pow( phenot[k] - _pmeanP[i][p], 3); //the mean has been set by setStats()
5148 
5149  return skew / patch_size;
5150 }
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 
)
5347 {
5348  //ONLY IMPLEMENTED FOR DIALLELIC LOCI!
5349  if(_SHLinkedTrait->get_allele_model() > 1)
5350  fatal("TTQuantiSH::getSNPalleleFreqInPatch::SNP allele frequencies can only be computed for di-allelic loci, sorry!\n");
5351 
5352  Individual* ind;
5353  TTQuanti* Qtrait;
5354 
5355  if(!_SHLinkedTrait) fatal("TTQuantiSH::getSNPalleleFreqInPatch:: Pointer to trait prototype is not set!\n");
5356 
5357  unsigned int seqLength = _SHLinkedTrait->get_seq_length();
5358 
5359  //create a null vector of the total sequence size, including alleles affecting all traits (max 2 for di-allelic loci)
5360  vector<double> snp_tab(seqLength, 0.0);
5361 
5362  for(unsigned int s = 0; s < 2; ++s){
5363 
5364  for(unsigned int j = 0, size = patch->size(sex_t(s), AGE); j < size; ++j) {
5365 
5366  ind = patch->get(sex_t(s), AGE, j);
5367 
5368  Qtrait = dynamic_cast<TTQuanti*>(ind->getTrait(_SHLinkedTraitIndex));
5369 
5370  //compute allele freq at all positions, we count allele 0 (freq 'p' is for trait-increasing allele in diallelic model)
5371  for(unsigned int i = 0; i < seqLength; ++i) {
5372  snp_tab[i] += !Qtrait->get_allele_bit(i, 0) + !Qtrait->get_allele_bit(i, 1);
5373  }
5374 
5375  }
5376 
5377  }
5378 
5379  // pre-compute 1/2N :
5380  double inv_size = 1.0/(2.0*patch->size(AGE));
5381 
5382  std::transform(snp_tab.cbegin(), snp_tab.cend(), snp_tab.begin(), [inv_size](double i){return i*inv_size;});
5383 
5384  return snp_tab;
5385 }
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

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

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

4603 {
4605 
4607 
4608  _eVar = (!_SHLinkedTrait->get_env_var().empty() || !_SHLinkedTrait->get_heritability().empty());
4609 
4610  resetPtrs(); //deallocate anything that was previously allocated
4611 
4612  if(_patchNbr != _pop->getPatchNbr())
4613  _patchNbr = _pop->getPatchNbr();
4614 
4617 
4620 
4621  _meanP = new double [_num_trait];
4622  _meanG = new double [_num_trait];
4623  _Va = new double [_num_trait];
4624  _Vg = new double [_num_trait];
4625  _Vb = new double [_num_trait];
4626  _Vp = new double [_num_trait];
4627 
4628  _pVa = new double* [_num_trait];
4629  _pVp = new double* [_num_trait];
4630  _pmeanP = new double* [_num_trait];
4631  _pmeanG = new double* [_num_trait];
4632 
4633  for(unsigned int i=0; i < _num_trait; ++i) {
4634 
4635  _pVa[i] = new double [_patchNbr];
4636  _pVp[i] = new double [_patchNbr];
4637  _pmeanP[i] = new double [_patchNbr];
4638  _pmeanG[i] = new double [_patchNbr];
4639 
4640  }
4641 
4642  if(_num_trait > 1) {
4643 
4644  _G = gsl_matrix_alloc(_num_trait,_num_trait);
4645  _eval = gsl_vector_alloc (_num_trait);
4646  _evec = gsl_matrix_alloc (_num_trait, _num_trait);
4647  _ws = gsl_eigen_symmv_alloc (_num_trait);
4648 
4649  _peigval = new double* [_num_trait];
4650 // _eigvect = new double* [_num_trait];
4651 
4652  for(unsigned int i=0; i < _num_trait; ++i) {
4653 // _eigvect[i] = new double [_num_trait];
4654  _peigval[i] = new double [_patchNbr];
4655  }
4656 
4657  _peigvect = new double* [_patchNbr];
4658 
4659  for(unsigned int i = 0; i < _patchNbr; i++)
4660  _peigvect[i] = new double [_num_trait*_num_trait];
4661 
4662  _covar = new double [_num_trait*(_num_trait -1)/2];
4663 
4664  _pcovar = new double* [_num_trait*(_num_trait - 1)/2];
4665 
4666  for(unsigned int i = 0; i < _num_trait*(_num_trait - 1)/2; i++)
4667  _pcovar[i] = new double [_patchNbr];
4668 
4669  }
4670 
4671 }
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 ( )
4545 {
4546 
4547  if(_G) gsl_matrix_free(_G);
4548  if(_eval) gsl_vector_free(_eval);
4549  if(_evec) gsl_matrix_free(_evec);
4550  if(_ws) gsl_eigen_symmv_free (_ws);
4551 
4552  if(_meanP) delete [] _meanP; _meanP = NULL;
4553  if(_meanG) delete [] _meanG; _meanG = NULL;
4554  if(_Va) delete [] _Va; _Va = NULL;
4555  if(_Vg) delete [] _Vg; _Vg = NULL;
4556  if(_Vb) delete [] _Vb; _Vb = NULL;
4557  if(_Vp) delete [] _Vp; _Vp = NULL;
4558 
4559 
4560  if(_pVa) {
4561  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pVa[i];
4562  delete [] _pVa; _pVa = NULL;
4563  }
4564  if(_pVp) {
4565  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pVp[i];
4566  delete [] _pVp; _pVp = NULL;
4567  }
4568  if(_pmeanP) {
4569  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pmeanP[i];
4570  delete [] _pmeanP; _pmeanP = NULL;
4571  }
4572  if(_pmeanG) {
4573  for(unsigned int i=0; i < _num_trait; ++i) delete [] _pmeanG[i];
4574  delete [] _pmeanG; _pmeanG = NULL;
4575  }
4576 
4577  if(_peigval) {
4578  for(unsigned int i=0; i < _num_trait; ++i) delete [] _peigval[i];
4579  delete [] _peigval;
4580  _peigval = NULL;
4581  }
4582 
4583  if(_covar) delete [] _covar;
4584  _covar = NULL;
4585 
4586  if(_pcovar) {
4587  for(unsigned int i = 0; i < (_num_trait*(_num_trait - 1)/2); i++) delete [] _pcovar[i];
4588  delete [] _pcovar;
4589  _pcovar = NULL;
4590  }
4591 
4592  if(_peigvect) {
4593  for(unsigned int i = 0; i < _patchNbr; i++) delete [] _peigvect[i];
4594  delete [] _peigvect;
4595  _peigvect = NULL;
4596  }
4597 
4598 }

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:5225

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)
5155 {
5156  unsigned int **sizes;
5157  unsigned int nb_patch = _pop->getPatchNbr();
5158 
5159  sizes = new unsigned int * [_num_trait];
5160 
5161  for(unsigned int i = 0; i < _num_trait; ++i) {
5162  sizes[i] = new unsigned int [nb_patch];
5163  for(unsigned int j = 0; j < nb_patch; ++j)
5164  sizes[i][j] = _pop->size(AGE, j);
5165  }
5166 
5167  _phenoTable.update(_num_trait, nb_patch, sizes);
5168  _genoTable.update(_num_trait, nb_patch, sizes);
5169 
5170  for(unsigned int i = 0; i < _num_trait; ++i)
5171  delete [] sizes[i];
5172  delete [] sizes;
5173 
5174  Patch* patch;
5175  age_idx age = (AGE == ADULTS ? ADLTx : OFFSx);
5176 
5177  for(unsigned int i = 0, n; i < nb_patch; i++) {
5178 
5179  patch = _pop->getPatch(i);
5180 
5181  n = 0;
5182 
5183  if ((patch->size(MAL, age)+patch->size(FEM, age)) != _phenoTable.size(0,i)) {
5184  fatal("problem while recording quanti trait values; table size doesn't match patch size.\n");
5185  }
5186 
5187  store_quanti_trait_values(patch, i, patch->size(MAL, age), &n, MAL, age, &_phenoTable, &_genoTable,
5189 
5190  store_quanti_trait_values(patch, i, patch->size(FEM, age), &n, FEM, age, &_phenoTable, &_genoTable,
5192 
5193  if (n != _phenoTable.size(0,i) || n != _genoTable.size(0,i)) {
5194  fatal("problem while recording quanti trait values; size counter doesn't match table size.\n");
5195  }
5196  } // end for patches
5197 }
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:5201
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.

4676 {
4677 #ifdef _DEBUG_
4678  message("-TTQuantiSH::setStatRecorders ");
4679 #endif
4680  string age_tag = token.substr(0,token.find_first_of("."));
4681  string sub_token;
4682  age_t AGE = ALL;
4683 
4684  if (age_tag.size() != 0 && age_tag.size() != string::npos) {
4685 
4686  if (age_tag == "adlt") AGE = ADULTS;
4687 
4688  else if (age_tag == "off") AGE = OFFSPRG;
4689 
4690  else age_tag = "";
4691 
4692  } else {
4693  age_tag = "";
4694  }
4695 
4696  if (age_tag.size() != 0)
4697  sub_token = token.substr(token.find_first_of(".") + 1, string::npos);
4698  else
4699  sub_token = token;
4700 
4701  if(sub_token == "quanti") {
4702  addQuanti(AGE);
4703  } else if(sub_token == "quanti.patch") {
4704  addQuantiPerPatch(AGE);
4705  } else if(sub_token == "quanti.mean.patch") {
4706  addAvgPerPatch(AGE);
4707  } else if(sub_token == "quanti.pheno.patch") { // same as quanti.mean.patch
4708  addAvgPerPatch(AGE);
4709  } else if(sub_token == "quanti.geno.patch") {
4710  addGenotPerPatch(AGE);
4711  } else if(sub_token == "quanti.var.patch") {
4712  addVarPerPatch(AGE);
4713  } else if(sub_token == "quanti.covar.patch") {
4714  addCovarPerPatch(AGE);
4715  } else if(sub_token == "quanti.eigen.patch") {
4716  addEigenPerPatch(AGE);
4717  } else if(sub_token == "quanti.eigenvalues.patch") {
4719  } else if(sub_token == "quanti.eigenvect1.patch") {
4720  addEigenVect1PerPatch(AGE);
4721  } else if(sub_token == "quanti.skew.patch") {
4722  addSkewPerPatch(AGE);
4723 // } else if((sub_token == "quanti.epistasis") && (_SHLinkedTrait->do_epistasis())) {
4724 // addQuantiEpistasis(AGE);
4725 // _epistats = true;
4726 // } else if(sub_token == "quanti.effect.stats") {
4727 // addEffectStats(AGE);
4728 // _alleleStats = true;
4729  } else
4730  return false;
4731 
4732  return true;
4733 }
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)
5226 {
5227  if(_table_set_age == AGE
5230  return;
5231 
5232  unsigned int pop_size = _pop->size(AGE);
5233  unsigned int patch_size;
5234  double *phenot1, *genot1, *genot2;
5235 
5236  unsigned int nb_patch = _pop->getPatchNbr();
5237 
5238  if(nb_patch < _patchNbr) {
5239  warning("increase in patch number detected (in Quanti Stat Handler),");
5240  warning("stats for quanti trait will not be recorded in new patches, patch identity may have changed.\n");
5241  _patchNbr = nb_patch; // record stat only in remaining patches
5242  }
5243 
5244  if(nb_patch > _patchNbr) nb_patch = _patchNbr; //tables have been allocated for _patchNbr patches
5245 
5246  setDataTables(AGE);
5247 
5248 #ifdef HAS_GSL
5249  unsigned int c = 0; //covariance position counter
5250  unsigned int pv = 0; //eigenvector position counter
5251 
5252  //within deme stats:
5253  for(unsigned int j = 0; j < nb_patch; j++) {
5254 
5255  patch_size = _pop->size(AGE, j);
5256 
5257  for(unsigned int t=0; t < _num_trait; t++) {
5258 
5259  phenot1 = _phenoTable.getClassWithinGroup(t,j);
5260  genot1 = _genoTable.getClassWithinGroup(t,j);
5261 
5262  _pmeanP[t][j] = my_mean (phenot1, patch_size );
5263  _pmeanG[t][j] = my_mean (genot1, patch_size );
5264  _pVp[t][j] = my_variance_with_fixed_mean (phenot1, patch_size, _pmeanP[t][j]);
5265  _pVa[t][j] = my_variance_with_fixed_mean (genot1, patch_size, _pmeanG[t][j]);
5266 
5267  }
5268 
5269  if(_num_trait > 1) {
5270  c = 0;
5271  // calculate the covariances and G, need to adjust dimensions in class declaration
5272  for(unsigned int t1 = 0; t1 < _num_trait; t1++) {
5273  // set the diagonal elements of G here
5274 
5275  gsl_matrix_set(_G, t1, t1, _pVa[t1][j]);
5276 
5277  for(unsigned int t2 = t1 + 1; t2 < _num_trait; t2++) {
5278 
5279  genot1 = _genoTable.getClassWithinGroup(t1,j);
5280  genot2 = _genoTable.getClassWithinGroup(t2,j);
5281 
5282  _pcovar[c][j] = gsl_stats_covariance_m (genot1, 1, genot2, 1, patch_size,
5283  _pmeanG[t1][j], _pmeanG[t2][j]);
5284 
5285  gsl_matrix_set(_G, t1, t2, _pcovar[c][j]);
5286  gsl_matrix_set(_G, t2, t1, _pcovar[c++][j]);
5287  }
5288  }
5289 
5290  gsl_eigen_symmv (_G, _eval, _evec, _ws);
5291  gsl_eigen_symmv_sort (_eval, _evec, GSL_EIGEN_SORT_VAL_DESC);
5292 
5293  pv = 0;
5294 
5295  for(unsigned int t = 0; t < _num_trait; t++) {
5296  _peigval[t][j] = gsl_vector_get (_eval, t);
5297  for(unsigned int v = 0; v < _num_trait; v++)
5298  _peigvect[j][pv++] = gsl_matrix_get (_evec, v, t); //read eigenvectors column-wise
5299  }
5300  }
5301  } //_end_ for patch
5302 
5303  double meanGamong1;
5304  c = 0; //reset covariance positioner
5305 
5306  //among demes stats:
5307  for(unsigned int t1 = 0; t1 < _num_trait; t1++) {
5308 
5309  phenot1 = _phenoTable.getGroup(t1);
5310  genot1 = _genoTable.getGroup(t1);
5311 
5312  _meanP[t1] = my_mean (phenot1, pop_size ); //grand mean, pooling all individuals
5313  _meanG[t1] = my_mean (genot1, pop_size ); //grand mean, pooling all individuals
5314 
5315  _Vp[t1] = my_mean_no_nan (_pVp[t1], nb_patch); //mean within patch variance
5316  _Va[t1] = my_mean_no_nan (_pVa[t1], nb_patch); //mean within patch variance
5317 
5318  meanGamong1 = my_mean_no_nan (_pmeanG[t1], nb_patch); //mean of within patch mean genotypic values
5319 
5320  _Vb[t1] = my_variance_with_fixed_mean_no_nan (_pmeanG[t1], nb_patch, meanGamong1); //variance of patch means
5321 
5322  for(unsigned int t2 = t1 + 1; t2 < _num_trait; t2++) {
5323 
5324  _covar[c] = my_covariance_no_nan(_pmeanG[t1], _pmeanG[t2], nb_patch, nb_patch);
5325 
5326  //set covariance to the mean covariance within patch for recording
5327  _covar[c] = my_mean_no_nan (_pcovar[c], nb_patch);
5328 
5329  c++;
5330  }
5331 
5332  } //_end_ for trait
5333 
5334 #else
5335  fatal("install the GSL library to get the quanti stats!\n");
5336 #endif
5337 
5338  _table_set_age = AGE;
5341 
5342 }
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:5154
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.0 by  doxygen 1.9.1 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR