The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
commondata::gamma2gene Interface Reference

Sigmoidal relationship between environmental factor and the organism response, as affected by the genotype and environmental error, e.g. perception and neuronal response or intrinsic baseline and phenotypic hormone levels. More...

Collaboration diagram for commondata::gamma2gene:

Public Member Functions

real(srp) function gamma2gene_additive_i4 (gs, gh, signal, erpcv)
 The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response. More...
 
real(srp) function gamma2gene_additive_r4 (gs, gh, signal, erpcv)
 The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response. More...
 
elemental real(srp) function gamma2gene_fake_vals (signal, gs, gh, n_acomps)
 This "fake" version of the gamma2gene is used to guess the response values in calculations. More...
 

Detailed Description

Sigmoidal relationship between environmental factor and the organism response, as affected by the genotype and environmental error, e.g. perception and neuronal response or intrinsic baseline and phenotypic hormone levels.

The real function gamma2gene finds the sigmoid relationship for a multicomponent allele impact on the neuronal response:

\[ R= \frac{(P/y_{1})^{x_{1}}}{1+(P/y_{1})^{x_{1}}} + \frac{(P/y_{2})^{x_{2}}}{1+(P/y_{2})^{x_{2}}} + \frac{(P/y_{3})^{x_{3}}}{1+(P/y_{3})^{x_{3}}} ... \]

Here, R is the neuronal response, P the strength of the sensory input (scaled 0-1), and x and y are two genes. The indices refer to the additive components of the alleles. Note that their number is set by the parameter ADDITIVE_COMPS. Further, erpcv defines the coefficient of variation for the perception error (with respect to its true value). Perception is calculated as

\[ P=\bar{P}+\varepsilon , \]

where $ \bar{P} $ is the true environmental variable and $ \varepsilon $ is Gaussian error. The perception value with error is implemented as a normal Gaussian variate with the mean equal to the true signal value $ \bar{P} $ and the coefficient of variation equal to the erpcv input parameter: $ erpcv= \frac{\sigma}{\bar{P}} . $ Therefore, the raw error variance in the RNORM function is equal to the square: $ (erpcv \cdot signal)^{2} $. We also impose strict limit on perception:

\[ P > 0 . \]

The gamma2gene function is used as a calculation backend in the "umbrella" procedure the_genome::individual_genome::neuro_resp() that translates to the_genome::individual_genome::trait_init() and the_genome::individual_genome::trait_set().

Note
This is the generic interface for gamma2gene, currently there are two version making use of the additive allele components (normally used) accepting allele values either integer (assumed raw alleles) or real (assumed values rescaled to 0:1) type.
The function involving additive allele components has two variants: If called with integer parameters one and two (gs and gh) it automatically invokes the allelescale function to convert integer allele values to real raw values within the range 1:0 that go to the sigmoid function (via alleleconv). However, when these arguments are real type, it is assumed that it is the true converted 0:1 real gene values and allelescale is not invoked prior to alleleconv.
It would be more economical to use a single allele conversion function that does both allelescale and alleleconv. It is here for compatibility with the earlier model. Also, this might be a little more intuitive.

Definition at line 5269 of file m_common.f90.

Member Function/Subroutine Documentation

◆ gamma2gene_additive_i4()

real(srp) function commondata::gamma2gene::gamma2gene_additive_i4 ( integer, dimension(:), intent(in)  gs,
integer, dimension(:), intent(in)  gh,
real(srp), intent(in)  signal,
real(srp), intent(in), optional  erpcv 
)

The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response.

The real function gamma2gene finds the sigmoid relationship for a multicomponent allele impact on the neuronal response:

\[ R= \frac{(P/y_{1})^{x_{1}}}{1+(P/y_{1})^{x_{1}}} + \frac{(P/y_{2})^{x_{2}}}{1+(P/y_{2})^{x_{2}}} + \frac{(P/y_{3})^{x_{3}}}{1+(P/y_{3})^{x_{3}}} ... \]

Here, R is the neuronal response, P the strength of the sensory input (scaled 0-1), and x and y are two genes. The indices refer to the additive components of the alleles. Note that their number is set by the parameter ADDITIVE_COMPS. Further, erpcv defines the coefficient of variation for the perception error (with respect to its true value).

Returns
returns the neuronal response.
Parameters
[in]gsshape: Gene/constant determining the shape of the gamma function. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]ghhalf-max effect: Gene/constant for the signal strength giving half max effect. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]signalperception: Input value of (external or internal) stimulus perception.
[in]erpcverror: Additive error of stimulus perception, Gaussian variance added to the true environmental variable. If this parameter is absent, no perception error is introduced.
Maxima function for quick calc:
g2gene(p,x,y,n) := n * ( (p/y)^x / (1+(p/y)^x) );
Warning
This version of gamma2gene accepts integer arrays. It does invoke commondata::allelescale() automatically inside.

Definition at line 7003 of file m_common.f90.

Here is the call graph for this function:

◆ gamma2gene_additive_r4()

real(srp) function commondata::gamma2gene::gamma2gene_additive_r4 ( real(srp), dimension(:), intent(in)  gs,
real(srp), dimension(:), intent(in)  gh,
real(srp), intent(in)  signal,
real(srp), intent(in), optional  erpcv 
)

The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response.

Returns
returns the neuronal response.
Parameters
[in]shapeGene/constant determining the shape of the gamma function. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]half-maxeffect: Gene/constant for the signal strength giving half max effect. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]perceptionInput value of (external or internal) stimulus perception.
[in]errorAdditive error of stimulus perception, Gaussian variance added to the true environmental variable. If this parameter is absent, no perception error is introduced.

The real function gamma2gene finds the sigmoid relationship for a multicomponent allele impact on the neuronal response:

\[ R= \frac{(P/y_{1})^{x_{1}}}{1+(P/y_{1})^{x_{1}}} + \frac{(P/y_{2})^{x_{2}}}{1+(P/y_{2})^{x_{2}}} + \frac{(P/y_{3})^{x_{3}}}{1+(P/y_{3})^{x_{3}}} ... \]

Here, R is the neuronal response, P the strength of the sensory input (scaled 0-1), and x and y are two genes. The indices refer to the additive components of the alleles. Note that their number is set by the parameter ADDITIVE_COMPS. Further, erpcv defines the coefficient of variation for the perception error (with respect to its true value).


Maxima function for quick calc:

g2gene(p,x,y,n) := n * ( (p/y)^x / (1+(p/y)^x) );
Warning
This version of gamma2gene accepts real arrays. It does not invoke commondata::allelescale() automatically inside.

Definition at line 7115 of file m_common.f90.

Here is the call graph for this function:

◆ gamma2gene_fake_vals()

elemental real(srp) function commondata::gamma2gene::gamma2gene_fake_vals ( real(srp), intent(in)  signal,
real(srp), intent(in), optional  gs,
real(srp), intent(in), optional  gh,
integer, intent(in), optional  n_acomps 
)

This "fake" version of the gamma2gene is used to guess the response values in calculations.

Return values
predicted_vala predicted value (scalar or array) of the sigmoidal neuronal response function. See gamma2gene for details.

Definition at line 7193 of file m_common.f90.


The documentation for this interface was generated from the following file: