phenotype: Phenotype function

View source: R/glads_funcs.R

phenotypeR Documentation

Phenotype function

Description

A function for the computation of additive phenotypes

Usage

phenotype(G, bvs, add.loci, sex.ratio, e.v)

Arguments

G

An object of class "struct" with the genetic structure of each individual in the population.

bvs

A matrix with the breeding values of alleles on each loci. The number of rows is equal to the number of additive loci, while the number of columns is equal to the maximum number of alleles in a locus.

add.loci

An integer with the total number of additive loci participating in the computation of phenotypes.

sex.ratio

A numerical value defining the sex ratio of populations

e.v

A numerical value defining a stochastic environmental variant in the computation of phenotypes.

Details

This function is used internally in the function evolve() of type 'selection' in order to compute the additive phenotype value of individuals.

This phenotype function (z) focuses on an additive genetic genotype-phenotype map. The sum of values of alleles at each locus gives a breeding value (b_v) for each individual at a given locus. The sum of breeding values bvs across loci gives a breeding value for the phenotypes (z), which is computed as follows:

z = \sum_{v =1 }^{n_a} b_v + \varepsilon_e(0, \sigma_e)

Where n_a is equal to 'add.loci' and \sigma_e is equal to 'e.v'. The environmental contribution \varepsilon_e is assumed to be stochastic and normally distributed, with a mean of 0 and standard variation 'e.v'.

Value

A data.frame with rows equal to the number of individuals and two columns ('sex' and 'z')

References

QuilodrĂ¡n, C. S., Ruegg, K., Sendell-Price, A. T., Anderson, E., Coulson, T. and Clegg, S. (2020). The multiple population genetic and demographic routes to islands of genomic divergence. Methods in Ecology and Evolution. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/2041-210X.13324")}.

See Also

evolve fitness

Examples

## We first create a random population with 100 individuals and 10 loci
N <- 100  # Population size
nl <- 10  # Number of additive loci
na <- 4  # Number of alleles per locus
G <- initial.struct(N,nl,na)

## Additional parameters are needed for the computation of phenotypes
bvs <- t(array( seq(0,1, length = na) ,c(na, nl)))
sex.ratio <- 0.5
e.v=0.01

## Now we compute the additive phenotype value of individuals
phenotype(G, bvs, nl, sex.ratio, e.v)

eriqande/gids documentation built on Jan. 5, 2024, 12:31 a.m.