Skip to contents

Calculates the inbreeding coefficient of each individual in a population from the pedigree recorded in the SimParam. The pedigree must have been tracked from the start of the simulation, see setTrackPed.

Usage

pedigreeInbreeding(pop, simParam = NULL)

Arguments

pop

an object of Pop-class

simParam

an object of class SimParam. If NULL, the function uses the object named SP from the global environment.

Value

Returns a numeric vector named by the individuals' IDs.

Details

The inbreeding coefficient is the probability that two distinct alleles of an individual are identical by descent. The coefficients are calculated a generation at a time from the relationship between each individual's parents, which is found by the indirect method of Colleau (2002) without forming the relationship matrix. They are kept in the SimParam once calculated, so later calls only calculate them for individuals created since. Doubled haploids and inbred founders have an inbreeding coefficient of 1, and other founders of 0. The assumptions, including those for polyploids, are described in pedigreeA.

References

Colleau J (2002). “An indirect approach to the extensive calculation of relationship coefficients.” Genetics Selection Evolution, 34(4), 409–421. doi:10.1186/1297-9686-34-4-409 .

See also

Examples

#Create founder haplotypes
founderPop = quickHaplo(nInd=4, nChr=1, segSites=10)

#Set simulation parameters
SP = SimParam$new(founderPop)
SP$setTrackPed(TRUE)

#Two generations of selfing
pop = newPop(founderPop, simParam=SP)
pop2 = self(pop, simParam=SP)
pop3 = self(pop2, simParam=SP)

pedigreeInbreeding(pop3, simParam=SP)
#>    9   10   11   12 
#> 0.75 0.75 0.75 0.75