Description Usage Arguments Details Value References See Also Examples

A function for the computation of additive phenotypes

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

`G` |
An object of class |

`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. |

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 = ∑_{v =1 }^{n_a} b_v + \varepsilon_e(0, σ_e)*

Where *n_a* is equal to 'add.loci' and *σ_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'.

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

Quilodrán, C. S., Ruegg, K., Sendell-Price, A. T., Anderson, E., Coulson, T. and Clegg, S. (2019).
The multiple population genetic and demographic routes to islands of genomic divergence.
*bioRxiv*.
doi: 10.1101/673483.

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
## 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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.