Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
#include <ttbdmi.h>
Public Member Functions | |
TProtoBDMI () | |
TProtoBDMI (const TProtoBDMI &TP) | |
virtual | ~TProtoBDMI () |
int | get_nb_locus () |
double | get_mut_rate () |
bool | isHaploid () |
void | set_init_freq (double *val, unsigned int size) |
double | get_init_freq (unsigned int i) |
bool | isInitSet () |
double | getGenoFitnessHaplo (unsigned int row, unsigned int pos) |
double | getGenoFitnessDiplo (unsigned int row, unsigned int posA, unsigned int posB) |
double | getGenoFitnessDiplo (unsigned int row, unsigned int pos) |
void | setGenoFitnessValue (unsigned int row, unsigned int geno, double value) |
void | showGenoTable (unsigned int nrows) |
void | inherit (sex_t SEX, bitstring *seq, bitstring **parent) |
Implementations | |
| |
virtual void | init () |
virtual TTrait * | hatch () |
virtual TraitPrototype * | clone () |
virtual trait_t | get_type () const |
virtual void | store_data (BinaryStorageBuffer *saver) |
virtual bool | retrieve_data (BinaryStorageBuffer *reader) |
virtual bool | setParameters () |
virtual void | loadFileServices (FileServices *loader) |
virtual void | loadStatServices (StatServices *loader) |
virtual bool | resetParameterFromSource (std::string param, SimComponent *cmpt) |
![]() | |
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 | loadUpdaters (UpdaterServices *loader) |
Loads the parameters and component updater onto the updater manager. 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... | |
Private Attributes | |
trait_t | _type |
bool | _isHaploid |
unsigned int | _nb_locus |
double | _mut_rate |
double | _genomic_mut_rate |
double | _recomb_rate |
double * | _init_freq |
bool | _isInitSet |
void(TT_BDMI::* | _inherit_func_ptr )(TTrait *, TTrait *) |
void(TT_BDMI::* | _mutation_func_ptr )(void) |
double(TT_BDMI::* | _viability_func_ptr )(void) |
TMatrix * | _genoTable |
TTBDMI_SH * | _stater |
TTBDMI_FH * | _writer |
Static Private Attributes | |
static unsigned int | _diploGenotTableCoding [3][3] = {{0,1,2},{3,4,5},{6,7,8}} |
Additional Inherited Members | |
![]() | |
static void | recombine (unsigned long indID) |
![]() | |
static GeneticMap | _map |
![]() | |
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... | |
TProtoBDMI::TProtoBDMI | ( | ) |
References SimComponent::add_parameter(), TTProtoWithMap::addGeneticMapParameters(), BOOL, DBL, INT, MAT, SimComponent::set_paramset(), and STR.
Referenced by clone().
TProtoBDMI::TProtoBDMI | ( | const TProtoBDMI & | TP | ) |
References _genoTable, and SimComponent::_paramSet.
|
virtual |
References _genoTable, _init_freq, _stater, and _writer.
|
inlinevirtual |
|
inline |
References _init_freq.
Referenced by TT_BDMI::init_sequence().
|
inline |
References _nb_locus.
Referenced by TTBDMI_SH::countAllele_diplo(), TTBDMI_SH::countAllele_haplo(), TTBDMI_FH::FHwrite(), LCE_Init_BDMI::setParameters(), TTBDMI_SH::setStats(), TTBDMI_FH::write_diplo(), and TTBDMI_FH::write_haplo().
|
inlinevirtual |
Implements TraitPrototype.
References _type.
Referenced by TT_BDMI::get_type(), and TT_BDMI::operator==().
References _genoTable, and TMatrix::get().
|
inline |
References _diploGenotTableCoding, _genoTable, and TMatrix::get().
Referenced by TT_BDMI::get_allele_value(), and TT_BDMI::viability_diplo().
References _genoTable, and TMatrix::get().
Referenced by TT_BDMI::get_allele_value(), and TT_BDMI::viability_haplo().
|
virtual |
Implements TraitPrototype.
References _genomic_mut_rate, _inherit_func_ptr, _isHaploid, _mut_rate, _mutation_func_ptr, _nb_locus, _viability_func_ptr, TT_BDMI::set_geno_rate(), TT_BDMI::set_inherit_func_ptr(), TT_BDMI::set_isHaploid(), TT_BDMI::set_mut_rate(), TT_BDMI::set_mutation_func_ptr(), TT_BDMI::set_nb_locus(), TT_BDMI::set_proto(), and TT_BDMI::set_viability_func_ptr().
References TTProtoWithMap::_map, TTProtoWithMap::_mapIndex, TTProtoWithMap::_numChromosome, TTProtoWithMap::_numLociPerChrmsm, bitstring::copy(), GeneticMap::getFirstRecPosition(), and GeneticMap::getRecLoci().
Referenced by TT_BDMI::inherit_diplo(), and TT_BDMI::inherit_haplo().
|
inlinevirtual |
References setParameters().
|
inline |
References _isHaploid.
Referenced by TTBDMI_FH::FHwrite(), TTBDMI_SH::setAdultStats(), TTBDMI_SH::setOffsprgStats(), and TTBDMI_SH::setStats().
|
inline |
References _isInitSet.
Referenced by TT_BDMI::init_sequence().
|
virtual |
Implements SimComponent.
References _writer, FileServices::attach(), SimComponent::get_parameter(), Param::getMatrix(), Param::getValue(), Param::isMatrix(), Param::isSet(), TraitFileHandler< TP >::set(), and FileHandler::set_multi().
|
virtual |
Implements SimComponent.
References _stater, and StatServices::attach().
|
inlinevirtual |
Implements SimComponent.
|
virtual |
Implements StorableComponent.
References _isHaploid, _nb_locus, BinaryStorageBuffer::read(), and warning().
void TProtoBDMI::set_init_freq | ( | double * | val, |
unsigned int | size | ||
) |
References _init_freq, _isInitSet, and _nb_locus.
Referenced by LCE_Init_BDMI::execute().
References _genoTable, and TMatrix::set().
Referenced by TT_BDMI::set_allele_value().
|
virtual |
Implements SimComponent.
References _genomic_mut_rate, _genoTable, _inherit_func_ptr, _isHaploid, _isInitSet, _mut_rate, _mutation_func_ptr, _nb_locus, _viability_func_ptr, error(), SimComponent::get_parameter(), SimComponent::get_parameter_value(), Param::getMatrix(), TMatrix::getNbCols(), TT_BDMI::inherit_diplo(), TT_BDMI::inherit_haplo(), message(), TT_BDMI::mutate_diplo(), TT_BDMI::mutate_haplo(), TTProtoWithMap::setGeneticMapParameters(), showGenoTable(), TT_BDMI::viability_diplo(), and TT_BDMI::viability_haplo().
Referenced by init().
void TProtoBDMI::showGenoTable | ( | unsigned int | nrows | ) |
References _genoTable, _isHaploid, and TMatrix::get().
Referenced by setParameters(), and TT_BDMI::show_up().
|
inlinevirtual |
Implements StorableComponent.
References _isHaploid, _nb_locus, and BinaryStorageBuffer::store().
|
staticprivate |
Referenced by getGenoFitnessDiplo().
|
private |
Referenced by hatch(), and setParameters().
|
private |
Referenced by getGenoFitnessDiplo(), getGenoFitnessHaplo(), setGenoFitnessValue(), setParameters(), showGenoTable(), TProtoBDMI(), and ~TProtoBDMI().
Referenced by hatch(), and setParameters().
|
private |
Referenced by get_init_freq(), set_init_freq(), and ~TProtoBDMI().
|
private |
Referenced by hatch(), isHaploid(), retrieve_data(), setParameters(), showGenoTable(), and store_data().
|
private |
Referenced by isInitSet(), set_init_freq(), and setParameters().
|
private |
Referenced by get_mut_rate(), hatch(), and setParameters().
|
private |
Referenced by hatch(), and setParameters().
|
private |
Referenced by get_nb_locus(), hatch(), retrieve_data(), set_init_freq(), setParameters(), and store_data().
|
private |
|
private |
Referenced by loadStatServices(), and ~TProtoBDMI().
|
private |
Referenced by get_type().
|
private |
Referenced by hatch(), and setParameters().
|
private |
Referenced by loadFileServices(), and ~TProtoBDMI().