ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
Class for the genetic material optionally carried by animals in ALMaSS. More...
#include <GeneticMaterial.h>
Public Member Functions | |
GeneticMaterial () | |
void | ReadFrequencies () |
void | SetAllele (int pos, uint32 value, int Chromosome) |
uint32 | GetAllele (int pos, int Chromosome) |
void | PrintChromosome (char *C, int Chromosome) |
int | HomozygosityCount () |
int | HeterozygosityCount () |
void | Recombine (GeneticMaterial *Gen21, GeneticMaterial *Gene2) |
void | Initiation (AlleleFreq *Al) |
float | ScoreReproduction () |
float | ScoreHQThreshold () |
void | SetGeneticFlag () |
void | SetDirectFlag () |
void | UnsetGeneticFlag () |
void | UnsetDirectFlag () |
uint32 | GetGeneticFlag () |
uint32 | GetDirectFlag () |
void | Mutation_1 () |
void | Mutation_1ab () |
void | Mutation_2 () |
void | Mutation_3 () |
void | Mutation_4 () |
Protected Attributes | |
uint32 | Chromosome [6] |
Class for the genetic material optionally carried by animals in ALMaSS.
GeneticMaterial::GeneticMaterial | ( | ) |
References Chromosome.
uint32 GeneticMaterial::GetAllele | ( | int | pos, |
int | Chromosome | ||
) |
References Chromosome.
Referenced by GetDirectFlag(), GetGeneticFlag(), HeterozygosityCount(), HomozygosityCount(), Mutation_2(), Mutation_3(), Mutation_4(), PrintChromosome(), Recombine(), Vole_Base::SupplyAllele(), and Vole_Base::SupplyMyAllele().
uint32 GeneticMaterial::GetDirectFlag | ( | ) |
References GetAllele().
Referenced by Vole_Base::GetDirectFlag(), and Vole_JuvenileMale::st_BecomeSubAdult().
uint32 GeneticMaterial::GetGeneticFlag | ( | ) |
References GetAllele().
Referenced by Vole_Base::GetGeneticFlag(), and Vole_JuvenileMale::st_BecomeSubAdult().
int GeneticMaterial::HeterozygosityCount | ( | ) |
int GeneticMaterial::HomozygosityCount | ( | ) |
void GeneticMaterial::Initiation | ( | AlleleFreq * | Al | ) |
The method called to intialise genes on initiation of the simulation.
Gene frequencies are based on an external text file input read in on construction.
References g_random_fnc(), SetAllele(), and AlleleFreq::SupplyAN().
Referenced by Vole_Population_Manager::Init().
void GeneticMaterial::Mutation_1 | ( | ) |
void GeneticMaterial::Mutation_1ab | ( | ) |
random allele choice a & b only
References g_rand_uni_fnc(), g_random_fnc(), MutationChance, and SetAllele().
void GeneticMaterial::Mutation_2 | ( | ) |
Move one allele +/-
References g_rand_uni_fnc(), g_random_fnc(), GetAllele(), MutationChance, and SetAllele().
void GeneticMaterial::Mutation_3 | ( | ) |
switch a<->b & c<->d
References g_rand_uni_fnc(), g_random_fnc(), GetAllele(), MutationChance, and SetAllele().
void GeneticMaterial::Mutation_4 | ( | ) |
Specially mutation of only the first locus with two options 0/1
References g_rand_uni_fnc(), g_random_fnc(), GetAllele(), and MutationChance.
void GeneticMaterial::PrintChromosome | ( | char * | C, |
int | Chromosome | ||
) |
References GetAllele().
void GeneticMaterial::ReadFrequencies | ( | ) |
void GeneticMaterial::Recombine | ( | GeneticMaterial * | Gen21, |
GeneticMaterial * | Gene2 | ||
) |
References g_random_fnc(), GetAllele(), and SetAllele().
float GeneticMaterial::ScoreHQThreshold | ( | ) |
This function can be used to alter fitness based on associated genetic codes. These are only used in population genetic research, e.g. to create hybrid zones.
float GeneticMaterial::ScoreReproduction | ( | ) |
This function can be used to alter reproductive effects based on genetic codes. These are only used in population genetic research.
void GeneticMaterial::SetAllele | ( | int | pos, |
uint32 | value, | ||
int | Chromosome | ||
) |
References Chromosome.
Referenced by Initiation(), Mutation_1(), Mutation_1ab(), Mutation_2(), Mutation_3(), Recombine(), SetDirectFlag(), SetGeneticFlag(), UnsetDirectFlag(), and UnsetGeneticFlag().
void GeneticMaterial::SetDirectFlag | ( | ) |
void GeneticMaterial::SetGeneticFlag | ( | ) |
References SetAllele().
Referenced by Vole_Base::SetGeneticFlag().
void GeneticMaterial::UnsetDirectFlag | ( | ) |
References SetAllele().
Referenced by Vole_Base::UnsetDirectFlag().
void GeneticMaterial::UnsetGeneticFlag | ( | ) |
References SetAllele().
Referenced by Vole_Base::UnsetGeneticFlag().
|
protected |
Referenced by GeneticMaterial(), GetAllele(), and SetAllele().