newborns: Genetic structure of newborns

Description Usage Arguments Details Value See Also

View source: R/glads_funcs.R


This function generates the genetic structure of the generation of newborns.


newborns(x, recombination, type)



List of demographic and genetic parameter values (see Details).


Type of recombination between homologous chromosomes. Current options are 'map' and 'average' (see Details).


Type of simulated evolution. Current options are 'constant', 'dynamic', 'additive', and 'custom' (see Details).


The function is used internally in the function evolve() in order to generate the genetic structure of the newborns of each generation. A three-dimensional array is returned. Rows represent individuals and columns the different loci. Each element of the array is an integer defining the copy of a given allele at a given locus. The third dimension of the array has two layers representing a pair of homologous chromosomes.

The following parameter should be included as a list of parameters 'x':

Different types of evolution are available for simulations:

The recombination between homologous chromosomes are either of type 'map' or 'average'. The first case needs a vector with the recombination rate (ρ) between neigbour loci of length equal to nl - 1 (nl: number of loci). The probability of having a crossover (1) or not (0) is uniformly distributed at a rate defined by the value of ρ between loci (i.e. positions with a probability smaller than ρ recombine). The uniform distribution allows each position with the same values of ρ to have an equal chance of crossover across all iterations. There is no recombination between homologous chromosomes when ρ = 0, both loci are completely linked (e.g. within an inversion or situated close to centromeres), while with a value of ρ = 0.5, the recombination rate is completely random (i.e. both loci are very distant on the same chromosome or are located on different chromosomes). A value of ρ < 0.5 means the loci are physically linked. The second case, when recombination is of type 'average', a numerical value with the average recombination rate per base pair should be supplied, the loci position and the size of the chromosome in megabase are also required. The crossover points are exponentially distributed as a Poisson process (see Example).


An object of class "struct" or an array.

See Also


eriqande/glads documentation built on April 24, 2020, 11:53 a.m.