Simulate population {noia}R Documentation

Simulates a Population from a Genotype-Phenotype Map

Description

The simulatePop function takes a Genotype-to-Phenotype map (i.e. a vector defining the genotypic value of all possible genotypes) and returns a data frame containing the simulated population. drawGenotype generates a single-individual genotype, and is a sub-routine of simulatePop.

Usage

simulatePop(gmap, N = 100, sigmaE = 1, type = "F2")
drawGenotype(nloc = 1, type = "F2")

Arguments

gmap The Genotype-to-phenotype map: a vector of size 3$^L$, where L is the number of loci. The vector should be named with the code of each genotype (see genNames.
N Number of individuals.
sigmaE Standard deviation of the environmental noise (normally distributed).
type Type of population. "F2", "Finf" and "F1" are possible.
nloc Number of loci.

Value

Returns a data frame, in which the first column ($phen) contains the phenotypes, and the following ones ($Loc1, $loc2, etc) the genotypes of all individuals.

Author(s)

Arnaud Le Rouzic <a.p.s.lerouzic@bio.uio.no>

References

Le Rouzic A, Alvarez-Castro JM. (2008). Estimation of genetic effects and genotype-phenotype maps. Evolutionary Bioinformatics, 4.

See Also

GPmap, genNames

Examples

set.seed(123456789)

map <- c(0.25, -0.75, -0.75, -0.75, 2.25, 2.25, -0.75, 2.25, 2.25)
pop <- simulatePop(map, N=500, sigmaE=0.2, type="F2")
str(pop)

[Package noia version 0.93 Index]