Nemo  2.4.2
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
751  _meanP(0), _meanG(0), _Va(0), _Vg(0), _Vb(0), _Vp(0), _covar(0),
752  _pmeanP(0), _pmeanG(0), _pVa(0), _pVp(0), _pcovar(0), _peigval(0), _peigvect(0),
753  _eVar(0), _num_locus(0), _num_trait(0),_patchNbr(0), _G(0), _evec(0),_eval(0),_ws(0),
754  _table_set_gen(999999), _table_set_age(999999), _table_set_repl(999999)
755  {}
double * _Vp
Definition: ttquanti.h:734
double ** _pVa
Definition: ttquanti.h:735
double * _Vb
Definition: ttquanti.h:734
unsigned int _num_locus
Definition: ttquanti.h:738
double * _meanP
Definition: ttquanti.h:734
double ** _pVp
Definition: ttquanti.h:735
bool _eVar
Definition: ttquanti.h:736
gsl_matrix * _evec
Definition: ttquanti.h:740
unsigned int _table_set_age
Definition: ttquanti.h:745
double ** _pmeanP
Definition: ttquanti.h:735
double * _meanG
Definition: ttquanti.h:734
gsl_vector * _eval
Definition: ttquanti.h:741
double * _covar
Definition: ttquanti.h:734
gsl_matrix * _G
Definition: ttquanti.h:740
double ** _peigvect
Definition: ttquanti.h:735
unsigned int _table_set_repl
Definition: ttquanti.h:745
gsl_eigen_symmv_workspace * _ws
Definition: ttquanti.h:742
unsigned int _table_set_gen
Definition: ttquanti.h:745
unsigned int _num_trait
Definition: ttquanti.h:738
double * _Va
Definition: ttquanti.h:734
double * _Vg
Definition: ttquanti.h:734
double ** _peigval
Definition: ttquanti.h:735
unsigned int _patchNbr
Definition: ttquanti.h:738
double ** _pcovar
Definition: ttquanti.h:735
double ** _pmeanG
Definition: ttquanti.h:735

◆ ~TTQuantiSH()

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

References resetPtrs().

Member Function Documentation

◆ addAvgPerPatch()

void TTQuantiSH::addAvgPerPatch ( age_t  AGE)
4820 {
4821  if (AGE == ALL) {
4824  return;
4825  }
4826 
4827  unsigned int patchNbr = _pop->getPatchNbr();
4828 
4829  string suffix = (AGE == ADULTS ? "adlt.":"off.");
4830  string name;
4831  string patch;
4832  string t1;
4833 
4834  void (TTQuantiSH::* setter) (void) = (AGE == ADULTS ?
4836 
4837  add("Mean phenotype of trait 1 in patch 1", suffix + "q1.p1", AGE, 0, 0, 0, 0,
4839 
4840  for(unsigned int p = 0; p < patchNbr; p++) {
4841  for(unsigned int i = 0; i < _num_trait; i++) {
4842  if(p == 0 && i == 0) continue;
4843  name = "Mean phenotype of trait " + tstring::int2str(i+1) + " in patch " + tstring::int2str(p+1);
4844  t1 = "q" + tstring::int2str(i+1);
4845  patch = ".p" + tstring::int2str(p+1);
4846  add(name, suffix + t1 + patch, AGE, i, p, 0, 0, &TTQuantiSH::getMeanPhenotPerPatch, 0);
4847  }
4848  }
4849 
4850 }
unsigned int getPatchNbr()
Definition: metapop.h:274
Metapop * _pop
Link to the current population, set through the link to the StatService.
Definition: stathandler.h:59
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:142
TTQuantiSH.
Definition: ttquanti.h:732
void addAvgPerPatch(age_t AGE)
Definition: ttquanti.cc:4819
double getMeanPhenotPerPatch(unsigned int i, unsigned int p)
Definition: ttquanti.h:790
void setAdultStats()
Definition: ttquanti.h:777
void setOffsprgStats()
Definition: ttquanti.h:778
static string int2str(const int i)
Writes an integer value into a string.
Definition: tstring.h:93
#define ALL
All ages age class flag.
Definition: types.h:54
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:52
#define OFFSPRG
Offspring age class flag.
Definition: types.h:48

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

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

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

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

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

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

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)
4804 {
4805 
4806  if (AGE == ALL) {
4809  return;
4810  }
4811 
4812  addAvgPerPatch(AGE);
4813  addVarPerPatch(AGE);
4814  addCovarPerPatch(AGE);
4815 }
void addVarPerPatch(age_t AGE)
Definition: ttquanti.cc:4889
void addQuantiPerPatch(age_t AGE)
Definition: ttquanti.cc:4803

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

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

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
787 {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
794 {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
793 {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
795 {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
780 {return _meanG[i];}

References _meanG.

◆ getMeanGenotPerPatch()

double TTQuantiSH::getMeanGenotPerPatch ( unsigned int  i,
unsigned int  p 
)
inline
789 {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
781 {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
790 {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
786 {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 
)
5137 {
5138  double skew = 0;
5139 
5140  double *phenot = _phenoTable.getClassWithinGroup(i, p);
5141  unsigned int patch_size = _phenoTable.size(i, p);
5142 
5143  for(unsigned int k = 0; k < patch_size; ++k)
5144  skew += pow( phenot[k] - _pmeanP[i][p], 3); //the mean has been set by setStats()
5145 
5146  return skew / patch_size;
5147 }
unsigned int size(unsigned int i, unsigned int j)
Definition: datatable.h:258
T * getClassWithinGroup(unsigned int group, unsigned int Class)
Accessor to a class array whithin a group.
Definition: datatable.h:223
DataTable< double > _phenoTable
Definition: ttquanti.h:744

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

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
782 {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

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

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
791 {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

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

References _Vb.

Referenced by addQuanti().

+ Here is the caller graph for this function:

◆ getVg()

double TTQuantiSH::getVg ( unsigned int  i)
inline
783 {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
785 {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
792 {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.

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

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

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
777 {setStats(ADULTS);}
void setStats(age_t AGE)
Definition: ttquanti.cc:5222

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)
5152 {
5153  unsigned int **sizes;
5154  unsigned int nb_patch = _pop->getPatchNbr();
5155 
5156  sizes = new unsigned int * [_num_trait];
5157 
5158  for(unsigned int i = 0; i < _num_trait; ++i) {
5159  sizes[i] = new unsigned int [nb_patch];
5160  for(unsigned int j = 0; j < nb_patch; ++j)
5161  sizes[i][j] = _pop->size(AGE, j);
5162  }
5163 
5164  _phenoTable.update(_num_trait, nb_patch, sizes);
5165  _genoTable.update(_num_trait, nb_patch, sizes);
5166 
5167  for(unsigned int i = 0; i < _num_trait; ++i)
5168  delete [] sizes[i];
5169  delete [] sizes;
5170 
5171  Patch* patch;
5172  age_idx age = (AGE == ADULTS ? ADLTx : OFFSx);
5173 
5174  for(unsigned int i = 0, n; i < nb_patch; i++) {
5175 
5176  patch = _pop->getPatch(i);
5177 
5178  n = 0;
5179 
5180  if ((patch->size(MAL, age)+patch->size(FEM, age)) != _phenoTable.size(0,i)) {
5181  fatal("problem while recording quanti trait values; table size doesn't match patch size.\n");
5182  }
5183 
5184  store_quanti_trait_values(patch, i, patch->size(MAL, age), &n, MAL, age, &_phenoTable, &_genoTable,
5186 
5187  store_quanti_trait_values(patch, i, patch->size(FEM, age), &n, FEM, age, &_phenoTable, &_genoTable,
5189 
5190  if (n != _phenoTable.size(0,i) || n != _genoTable.size(0,i)) {
5191  fatal("problem while recording quanti trait values; size counter doesn't match table size.\n");
5192  }
5193  } // end for patches
5194 }
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:152
unsigned int size()
Get the total number of individuals present in the population, all sex and age classes together.
Definition: metapop.h:310
Patch * getPatch(unsigned int i)
Patch accessor, return the ith+1 patch in the metapop.
Definition: metapop.h:255
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:430
DataTable< double > _genoTable
Definition: ttquanti.h:744
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:5198
age_idx
Array index of the age classes in the patch sizes and containers arrays.
Definition: types.h:39
@ OFFSx
Definition: types.h:40
@ ADLTx
Definition: types.h:40

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.

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

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

◆ setStats()

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

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.2 by  doxygen 1.9.1

Catalogued on GSR