Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
#include <ttrait_with_map.h>
Public Member Functions | |
TTProtoWithMap () | |
TTProtoWithMap (const TTProtoWithMap &TP) | |
virtual | ~TTProtoWithMap () |
void | setMapIndex (unsigned int idx) |
unsigned int | getMapIndex () |
bool | setGeneticMapParameters (string prefix) |
void | addGeneticMapParameters (string prefix) |
bool | setRecombinationMapRandom () |
bool | setRecombinationMapNonRandom (vector< vector< double > > *lociPositions) |
bool | setRecombinationMapFixed () |
bool | setNumLociPerChromosome (string param_name) |
void | reset_recombination_pointers () |
void | registerGeneticMap () |
void | unregisterFromGeneticMap () |
bool | areGeneticMapParamSet (string prefix) |
bool | isRecombinationFree (string prefix) |
void | recordRandomMap () |
virtual void | reset () |
![]() | |
virtual void | reset ()=0 |
Called at the end of a simulation to reset the Traits' prototypes (e.g. More... | |
virtual TTrait * | hatch ()=0 |
Creates the trait of which it is the prototype, called by IndFactory::makePrototype() . More... | |
virtual TraitPrototype * | clone ()=0 |
Returns a copy of itself. More... | |
virtual trait_t | get_type () const =0 |
Type accessor. More... | |
virtual void | set_index (int idx) |
Sets the traits index. More... | |
virtual int | get_index () |
Index getter. More... | |
![]() | |
virtual void | store_data (BinaryStorageBuffer *saver)=0 |
Interface to store the component data (e.g. gene values) into a binary buffer. More... | |
virtual bool | retrieve_data (BinaryStorageBuffer *reader)=0 |
Interface to retrieve the same data from the binary buffer. More... | |
virtual | ~StorableComponent () |
![]() | |
SimComponent () | |
virtual | ~SimComponent () |
virtual void | loadFileServices (FileServices *loader)=0 |
Loads the component's FileHandler onto the FileServices. More... | |
virtual void | loadStatServices (StatServices *loader)=0 |
Loads the component's StatHandler onto the StatServices. More... | |
virtual void | loadUpdaters (UpdaterServices *loader) |
Loads the parameters and component updater onto the updater manager. More... | |
virtual bool | setParameters ()=0 |
Default interface needed to initialize the component's variables from its input parameters value. More... | |
virtual void | set_paramset (ParamSet *paramset) |
Sets the ParamSet member. More... | |
virtual void | set_paramset (std::string name, bool required, SimComponent *owner) |
Sets a new ParamSet and name it. More... | |
virtual void | set_paramsetFromCopy (const ParamSet &PSet) |
Reset the set of parameters from a another set. More... | |
virtual ParamSet * | get_paramset () |
ParamSet accessor. More... | |
virtual void | add_parameter (Param *param) |
Interface to add a parameter to the set. More... | |
virtual void | add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd) |
Interface to add a parameter to the set. More... | |
virtual void | add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd, ParamUpdaterBase *updater) |
Interface to add a parameter and its updater to the set. More... | |
virtual Param * | get_parameter (std::string name) |
Param getter. More... | |
virtual double | get_parameter_value (std::string name) |
Param value getter. More... | |
virtual string | get_name () |
Returnd the name of the ParamSet, i.e. More... | |
virtual bool | has_parameter (std::string name) |
Param getter. More... | |
virtual bool | resetParameterFromSource (std::string param, SimComponent *cmpt)=0 |
Static Public Member Functions | |
static void | recombine (unsigned long indID) |
Static Public Attributes | |
static GeneticMap | _map |
Protected Attributes | |
unsigned int | _mapIndex |
double | _totRecombEventsMean |
double | _recombRate |
double | _mapResolution |
unsigned int | _numChromosome |
unsigned int | _numLoci |
double * | _recombRatePerChrmsm |
unsigned int * | _numLociPerChrmsm |
unsigned int * | _chrsmLength |
unsigned int * | _lociMapPositions |
![]() | |
int | _index |
The trait index in the Individual traits table. More... | |
![]() | |
ParamSet * | _paramSet |
The parameters container. More... | |
Private Attributes | |
string | _paramPrefix |
bool | _isRegistered |
Friends | |
class | TTraitWithMap |
|
inline |
TTProtoWithMap::TTProtoWithMap | ( | const TTProtoWithMap & | TP | ) |
References _chrsmLength, _lociMapPositions, _numChromosome, _numLoci, _numLociPerChrmsm, _recombRatePerChrmsm, and reset_recombination_pointers().
|
virtual |
References reset_recombination_pointers().
void TTProtoWithMap::addGeneticMapParameters | ( | string | prefix | ) |
References SimComponent::add_parameter(), DBL, and MAT.
Referenced by TProtoBDMI::TProtoBDMI(), TProtoDeletMutations_bitstring::TProtoDeletMutations_bitstring(), TProtoNeutralGenes::TProtoNeutralGenes(), and TProtoQuanti::TProtoQuanti().
bool TTProtoWithMap::areGeneticMapParamSet | ( | string | prefix | ) |
References SimComponent::get_parameter().
Referenced by isRecombinationFree().
bool TTProtoWithMap::isRecombinationFree | ( | string | prefix | ) |
References areGeneticMapParamSet(), SimComponent::get_parameter(), and SimComponent::get_parameter_value().
Referenced by TProtoNeutralGenes::setParameters(), and TProtoQuanti::setParameters().
|
static |
References _map, FEM, MAL, GeneticMap::recombine(), and GeneticMap::registerIndForRecombine().
Referenced by Individual::recombine().
void TTProtoWithMap::recordRandomMap | ( | ) |
References _lociMapPositions, _map, _numChromosome, _numLoci, _numLociPerChrmsm, _paramPrefix, tstring::dble2str(), SimComponent::get_parameter(), GeneticMap::getResolution(), Param::setArg(), and Param::setIsSet().
void TTProtoWithMap::registerGeneticMap | ( | ) |
References _isRegistered, _lociMapPositions, _map, _mapIndex, _mapResolution, _numChromosome, _numLoci, _numLociPerChrmsm, GeneticMap::addTrait(), and TraitPrototype::get_type().
Referenced by setGeneticMapParameters().
|
virtual |
Implements TraitPrototype.
Reimplemented in TProtoDeletMutations_bitstring, TProtoNeutralGenes, and TProtoQuanti.
References _isRegistered, _map, TraitPrototype::get_type(), and GeneticMap::unregisterTrait().
Referenced by TProtoDeletMutations_bitstring::reset(), TProtoNeutralGenes::reset(), and TProtoQuanti::reset().
void TTProtoWithMap::reset_recombination_pointers | ( | ) |
References _chrsmLength, _lociMapPositions, _numLociPerChrmsm, and _recombRatePerChrmsm.
Referenced by setGeneticMapParameters(), TTProtoWithMap(), and ~TTProtoWithMap().
bool TTProtoWithMap::setGeneticMapParameters | ( | string | prefix | ) |
References _chrsmLength, _mapResolution, _numChromosome, _numLoci, _numLociPerChrmsm, _paramPrefix, _recombRate, _recombRatePerChrmsm, error(), TMatrix::get(), SimComponent::get_parameter(), SimComponent::get_parameter_value(), TraitPrototype::get_type(), Param::getMatrix(), TMatrix::getNbCols(), TMatrix::getNbRows(), Param::getVariableMatrix(), Param::isSet(), registerGeneticMap(), reset_recombination_pointers(), setNumLociPerChromosome(), setRecombinationMapFixed(), setRecombinationMapNonRandom(), setRecombinationMapRandom(), and warning().
Referenced by TProtoBDMI::setParameters(), TProtoDeletMutations_bitstring::setParameters(), TProtoNeutralGenes::setParameters(), and TProtoQuanti::setParameters().
|
inline |
bool TTProtoWithMap::setNumLociPerChromosome | ( | string | param_name | ) |
References _numChromosome, _numLoci, _numLociPerChrmsm, error(), TMatrix::get(), SimComponent::get_parameter(), Param::getMatrix(), TMatrix::getNbCols(), and TMatrix::getNbRows().
Referenced by setGeneticMapParameters().
bool TTProtoWithMap::setRecombinationMapFixed | ( | ) |
References _lociMapPositions, _mapResolution, _numChromosome, _numLoci, _numLociPerChrmsm, and _recombRatePerChrmsm.
Referenced by setGeneticMapParameters().
bool TTProtoWithMap::setRecombinationMapNonRandom | ( | vector< vector< double > > * | lociPositions | ) |
References _lociMapPositions, _numChromosome, _numLoci, and _numLociPerChrmsm.
Referenced by setGeneticMapParameters().
bool TTProtoWithMap::setRecombinationMapRandom | ( | ) |
!there might be duplicates, we don't deal with those
References _chrsmLength, _lociMapPositions, _mapResolution, _numChromosome, _numLoci, _numLociPerChrmsm, _paramPrefix, tstring::dble2str(), SimComponent::get_parameter(), Param::setArg(), Param::setIsSet(), and RAND::Uniform().
Referenced by setGeneticMapParameters().
void TTProtoWithMap::unregisterFromGeneticMap | ( | ) |
References _isRegistered, _map, TraitPrototype::get_type(), and GeneticMap::unregisterTrait().
|
friend |
|
protected |
Referenced by reset_recombination_pointers(), setGeneticMapParameters(), setRecombinationMapRandom(), and TTProtoWithMap().
|
private |
Referenced by registerGeneticMap(), reset(), and unregisterFromGeneticMap().
|
protected |
|
static |
Referenced by IndFactory::clearPrototype(), TProtoBDMI::inherit(), TProtoDeletMutations_bitstring::inherit_low(), TProtoQuanti::inherit_low(), TProtoNeutralGenes::inherit_low(), recombine(), recordRandomMap(), registerGeneticMap(), reset(), unregisterFromGeneticMap(), TTNeutralGenesFH::write_PLINK(), and TTQuantiFH::write_PLINK().
|
protected |
|
protected |
Referenced by registerGeneticMap(), setGeneticMapParameters(), setRecombinationMapFixed(), and setRecombinationMapRandom().
|
protected |
Referenced by TProtoBDMI::inherit(), TProtoDeletMutations_bitstring::inherit_low(), TProtoQuanti::inherit_low(), TProtoNeutralGenes::inherit_low(), recordRandomMap(), registerGeneticMap(), setGeneticMapParameters(), setNumLociPerChromosome(), setRecombinationMapFixed(), setRecombinationMapNonRandom(), setRecombinationMapRandom(), and TTProtoWithMap().
|
protected |
|
protected |
Referenced by TProtoBDMI::inherit(), TProtoDeletMutations_bitstring::inherit_low(), TProtoQuanti::inherit_low(), TProtoNeutralGenes::inherit_low(), recordRandomMap(), registerGeneticMap(), reset_recombination_pointers(), setGeneticMapParameters(), setNumLociPerChromosome(), setRecombinationMapFixed(), setRecombinationMapNonRandom(), setRecombinationMapRandom(), and TTProtoWithMap().
|
private |
Referenced by recordRandomMap(), setGeneticMapParameters(), and setRecombinationMapRandom().
|
protected |
|
protected |
Referenced by reset_recombination_pointers(), setGeneticMapParameters(), setRecombinationMapFixed(), and TTProtoWithMap().
|
protected |