|
Nemo
2.4.0
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
Interface for all trait types, declares all basic trait operations. More...
#include <ttrait.h>
Inheritance diagram for TTrait:
Collaboration diagram for TTrait:Public Member Functions | |
| virtual void | init ()=0 |
| Called to allocate the trait's genotypic sequences. More... | |
| virtual void | init_sequence ()=0 |
| Called at the start of each replicate, sets the initial genotypes. More... | |
| virtual void | reset ()=0 |
| Called at the end of each simulation/replicate, deallocates sequence memory. More... | |
| virtual void | inherit (const TTrait *mother, const TTrait *father)=0 |
| Inheritance procedure, creates a new trait from mother's and father's traits. More... | |
| virtual void | mutate ()=0 |
| Mutation procedure, perform mutations on the genes sequence. More... | |
| virtual void * | set_trait (void *value)=0 |
| Called to set the phenotypic to a particular value or to give context-dependant value(s) to the trait. More... | |
| virtual void | set_sequence (void **seq)=0 |
| Called to set the sequence pointer to an existing trait. More... | |
| virtual unsigned int | get_allele (int loc, int all) const =0 |
| Called to read the allele identity at a locus. More... | |
| virtual double | get_allele_value (int loc, int all) const =0 |
| Called to read the value of the allele at a particular locus. More... | |
| virtual void | set_allele_value (unsigned int locus, unsigned int allele, double value)=0 |
| Called to change the allelic value at a particular locus. More... | |
| virtual void | set_value ()=0 |
| Tells the trait to set its phenotype from genotype, should be used instead of getValue(). More... | |
| virtual void * | getValue () const =0 |
| Genotype to phenotype mapper. More... | |
| virtual trait_t | get_type () const =0 |
| type accessor. More... | |
| virtual void ** | get_sequence () const =0 |
| sequence accessor. More... | |
| virtual void | show_up ()=0 |
| Writes some info to stdout. More... | |
| virtual TTrait * | clone ()=0 |
| Returns a copy of itself. More... | |
| virtual | ~TTrait () |
Operators | |
| virtual TTrait & | operator= (const TTrait &)=0 |
| Copies the complete state of the trait from right to left side of the operator, sequence data included. More... | |
| virtual bool | operator== (const TTrait &)=0 |
| Checks for parameters equivalence, not genetic equivalence. More... | |
| virtual bool | operator!= (const TTrait &)=0 |
Public Member Functions inherited from StorableComponent | |
| 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 () |
Interface for all trait types, declares all basic trait operations.
This pure abstract class declares the traits interface. The precise genetic architecture of the trait is not defined and is up to the designer of the trait. It uses void pointers to allow users to define their own structure. Existing traits use various types for their genes sequence, like char, double or bitset. It is up to the trait's user to know what kind of structure they expect. The trait objects are contained in the Individual class. Their parameters are set by their TraitPrototype.
|
pure virtual |
Returns a copy of itself.
Note: call the copy constructor of the trait which should only copy the parameters values not the complete state of the trait (i.e. shallow copy). The copy of the sequence data is made through the assignement operator!
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring_full_pleio_epistasis, TTQuanti_diallelic_bitstring_no_pleio_epistasis, TTQuanti_diallelic_no_pleio_epistasis, TTQuanti_continuous_no_pleio_epistasis, TTQuanti_diallelic_full_pleio_epistasis, TTQuanti_continuous_full_pleio_epistasis, TTQuanti_diallelic_bitstring_var_pleio, TTQuanti_diallelic_bitstring_full_pleio, TTQuanti_diallelic_bitstring_no_pleio, TTQuanti_diallelic_var_pleio, TTQuanti_diallelic_full_pleio, TTQuanti_diallelic_no_pleio, TTQuanti_continuous_single, TTQuanti_continuous_no_pleio, TTQuanti_continuous_var_pleio, TTQuanti_continuous_full_pleio, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
|
pure virtual |
Called to read the allele identity at a locus.
Identity is 0-based, usually 0 is ancestral, 1+ derived allele (can have more than 2 alleles).
| loc | which locus |
| allele | from which DNA strand, FEM=1 is maternally inherited, MAL=o is paternally inherited |
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TTNeutralGenesSH::Coancestry(), TTNOhtaStats::FHwrite(), TTNeutralGenesSH::getDxyPerPatch(), GenotyperFH::prepare_data_table(), TTNeutralGenesFH::print_PLINK_PED(), GenotyperFH::print_snp_genotypes(), GenotyperFH::print_snp_id(), TTNeutralGenesSH::setAlleleTables(), TTNeutralGenesSH::setHeteroTable(), TTNeutralGenesSH::setHo(), TTNeutralGenesSH::setHo2(), TTNeutralGenesFH::write_patch_FSTAT(), TTNeutralGenesFH::write_patch_GENEPOP(), and TTNeutralGenesFH::write_patch_TAB().
Here is the caller graph for this function:
|
pure virtual |
Called to read the value of the allele at a particular locus.
It is not the identity of the allele, see get_allele()
| loc | locus position in the sequence |
| all | which allele we want to read the value from |
Implemented in TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTNeutralGenes, TTWolbachia, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TProtoQuanti::get_allele_value(), TTDispersal::inherit(), TTQuantiFH::print(), and GenotyperFH::print_genotypes().
Here is the caller graph for this function:
|
pure virtual |
sequence accessor.
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TTQuanti_continuous_full_pleio_epistasis::copy_sequence_1locus(), TTQuanti_diallelic_full_pleio_epistasis::copy_sequence_1locus(), TTQuanti_continuous_no_pleio_epistasis::copy_sequence_1locus(), TTQuanti_diallelic_no_pleio_epistasis::copy_sequence_1locus(), TTQuanti_continuous_full_pleio::copy_sequence_1locus(), TTQuanti_continuous_var_pleio::copy_sequence_1locus(), TTQuanti_continuous_no_pleio::copy_sequence_1locus(), TTQuanti_diallelic_no_pleio::copy_sequence_1locus(), TTQuanti_diallelic_full_pleio::copy_sequence_1locus(), TTQuanti_diallelic_var_pleio::copy_sequence_1locus(), TTQuanti_continuous_full_pleio_epistasis::copy_sequence_block(), TTQuanti_diallelic_full_pleio_epistasis::copy_sequence_block(), TTQuanti_continuous_no_pleio_epistasis::copy_sequence_block(), TTQuanti_diallelic_no_pleio_epistasis::copy_sequence_block(), TTQuanti_continuous_full_pleio::copy_sequence_block(), TTQuanti_continuous_var_pleio::copy_sequence_block(), TTQuanti_continuous_no_pleio::copy_sequence_block(), TTQuanti_diallelic_no_pleio::copy_sequence_block(), TTQuanti_diallelic_full_pleio::copy_sequence_block(), TTQuanti_diallelic_var_pleio::copy_sequence_block(), TTDeletMutBitstrFH::FHwrite(), TTDeletMutations_bitstring::inherit(), and TTNeutralGenes_byte::inherit().
|
pure virtual |
type accessor.
Implemented in TTWolbachia, TTQuanti, TTNeutralGenes, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TT_BDMI::operator==(), TTDeletMutations_bitstring::operator==(), TTNeutralGenes::operator==(), TTQuanti_continuous::operator==(), TTQuanti_diallelic::operator==(), TTQuanti_diallelic_bitstring::operator==(), and TTWolbachia::operator==().
Here is the caller graph for this function:
|
pure virtual |
Genotype to phenotype mapper.
Implemented in TTWolbachia, TTQuanti, TTNeutralGenes, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by Individual::getTraitValue(), TTWolbachia::inherit(), and TTDeletMutBitstrSH::setViability().
Here is the caller graph for this function:Inheritance procedure, creates a new trait from mother's and father's traits.
| mother | the mother's trait |
| father | the father's trait |
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by Individual::create(), Individual::createTrait(), and Individual::inheritTrait().
Here is the caller graph for this function:
|
pure virtual |
Called to allocate the trait's genotypic sequences.
Called each time a new Individual is created (Individual::init())
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring_no_pleio, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TProtoQuanti::setParameters().
Here is the caller graph for this function:
|
pure virtual |
Called at the start of each replicate, sets the initial genotypes.
Called by Individual::create().
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring_full_pleio_epistasis, TTQuanti_diallelic_bitstring_no_pleio_epistasis, TTQuanti_diallelic_no_pleio_epistasis, TTQuanti_continuous_no_pleio_epistasis, TTQuanti_diallelic_full_pleio_epistasis, TTQuanti_continuous_full_pleio_epistasis, TTQuanti_diallelic_bitstring_var_pleio, TTQuanti_diallelic_bitstring_full_pleio, TTQuanti_diallelic_bitstring_no_pleio, TTQuanti_diallelic_var_pleio, TTQuanti_diallelic_full_pleio, TTQuanti_diallelic_no_pleio, TTQuanti_continuous_single, TTQuanti_continuous_no_pleio, TTQuanti_continuous_var_pleio, TTQuanti_continuous_full_pleio, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by LCE_QuantiInit::init_trait_value(), and TProtoQuanti::setParameters().
Here is the caller graph for this function:
|
pure virtual |
Mutation procedure, perform mutations on the genes sequence.
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by Individual::create(), Individual::createTrait(), and Individual::mutateTrait().
Here is the caller graph for this function:
|
pure virtual |
Implemented in TTDispersal, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes, TTDeletMutations_bitstring, and TT_BDMI.
Copies the complete state of the trait from right to left side of the operator, sequence data included.
Implemented in TTDispersal, TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDeletMutations_bitstring, and TT_BDMI.
|
pure virtual |
Checks for parameters equivalence, not genetic equivalence.
Implemented in TTDispersal, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes, TTDeletMutations_bitstring, and TT_BDMI.
|
pure virtual |
Called at the end of each simulation/replicate, deallocates sequence memory.
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
|
pure virtual |
Called to change the allelic value at a particular locus.
| locus | the targeted locus |
| alele | the targeted allele |
| value | the value of the allele inserted |
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TTNeutralGenesFH::FHread(), and LCE_NtrlInit::init_allele_freq().
Here is the caller graph for this function:
|
pure virtual |
Called to set the sequence pointer to an existing trait.
| seq | the existing sequence pointer |
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring, TTQuanti_diallelic, TTQuanti_continuous, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TTQuantiFH::FHread().
Here is the caller graph for this function:
|
pure virtual |
Called to set the phenotypic to a particular value or to give context-dependant value(s) to the trait.
| value | the value passed to the trait |
Implemented in TTWolbachia, TTQuanti, TTNeutralGenes, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by Individual::setTrait().
Here is the caller graph for this function:
|
pure virtual |
Tells the trait to set its phenotype from genotype, should be used instead of getValue().
Implemented in TTWolbachia, TTQuanti, TTNeutralGenes, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by Individual::create(), Individual::createTrait(), LCE_QuantiInit::init_trait_value(), and Individual::setTraitValue().
Here is the caller graph for this function:
|
pure virtual |
Writes some info to stdout.
Implemented in TTNeutralGenes, TTWolbachia, TTQuanti_diallelic_bitstring_full_pleio_epistasis, TTQuanti_diallelic_bitstring_no_pleio_epistasis, TTQuanti_diallelic_no_pleio_epistasis, TTQuanti_continuous_no_pleio_epistasis, TTQuanti_diallelic_full_pleio_epistasis, TTQuanti_continuous_full_pleio_epistasis, TTQuanti_diallelic_bitstring_var_pleio, TTQuanti_diallelic_bitstring_full_pleio, TTQuanti_diallelic_bitstring_no_pleio, TTQuanti_diallelic_var_pleio, TTQuanti_diallelic_full_pleio, TTQuanti_diallelic_no_pleio, TTQuanti_continuous_single, TTQuanti_continuous_no_pleio, TTQuanti_continuous_var_pleio, TTQuanti_continuous_full_pleio, TTNeutralGenes_bitstring, TTNeutralGenes_byte, TTDispersal, TTDeletMutations_bitstring, and TT_BDMI.
Referenced by TProtoQuanti::setParameters().
Here is the caller graph for this function:
1.9.1 -- Nemo is hosted on