Simulates a specified number of offspring based on alleles provided by potential father(s) and mother(s)
Source:R/gl.sim.offspring.r
gl.sim.offspring.Rd
This takes a population (or a single individual) of fathers (provided as a genlight object) and mother(s) and simulates offspring based on 'random' mating. It can be used to simulate population dynamics and check the effect of those dynamics and allele frequencies, number of alleles. Another application is to simulate relatedness of siblings and compare it to actual relatedness found in the population to determine kinship.
Author
Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)
Examples
#Simulate 10 potential fathers
gl.fathers <- glSim(10, 20, ploidy=2)
#Simulate 10 potential mothers
gl.mothers <- glSim(10, 20, ploidy=2)
gl.sim.offspring(gl.fathers, gl.mothers, 2, sexratio=0.5)
#> /// GENLIGHT OBJECT /////////
#>
#> // 20 genotypes, 20 binary SNPs, size: 33.5 Kb
#> 0 (0 %) missing data
#>
#> // Basic content
#> @gen: list of 20 SNPbin
#> @ploidy: ploidy of each individual (range: 2-2)
#>
#> // Optional content
#> @ind.names: 20 individual labels
#> @other: a list containing: sex
#>