Documentation for SLiM function calcInbreedingLoad, which is a method of the SLiM class SLiMBuiltin. Note that the R function is a stub, it does not do anything in R (except bring up this documentation). It will only do anything useful when used inside a slim_block function further nested in a slim_script function call, where it will be translated into valid SLiM code as part of a full SLiM script.

calcInbreedingLoad(genomes, mutType)

Arguments

genomes

An object of type Genome object. See details for description.

mutType

An object of type null or MutationType object. Must be of length 1 (a singleton). The default value is NULL. See details for description.

Value

An object of type float. Return will be of length 1 (a singleton)

Details

Documentation for this function can be found in the official SLiM manual: page 752.

Calculates inbreeding load (the haploid number of lethal equivalents, or B) for a vector of genomes passed in genomes. The calculation can be limited to a focal mutation type passed in mutType; if mutType is NULL (the default), all of the mutations for the focal species will be considered. In any case, only deleterious mutations (those with a negative selection coefficient) will be included in the final calculation. The inbreeding load is a measure of the quantity of recessive deleterious variation that is heterozygous in a population and can contribute to fitness declines under inbreeding. This function implements the following equation from Morton et al. (1956), which assumes no epistasis and random mating: B = sum(qs) − sum(q2s) − 2sum(q(1−q)sh) where q is the frequency of a given deleterious allele, s is the absolute value of the selection coefficient, and h is its dominance coefficient. Note that the implementation sets a maximum |s| of 1.0 (i.e., a lethal allele); |s| can sometimes be greater than 1.0 when s is drawn from a distribution, but in practice an allele with s < -1.0 has the same lethal effect as when s = -1.0. Also note that this implementation will not work when the model changes the dominance coefficients of mutations using mutationEffect() callbacks, since it relies on the dominanceCoeff property of MutationType. Finally, note that, to estimate the diploid number of lethal equivalents (2B), the result from this function can simply be multiplied by two. This function was contributed by Chris Kyriazis; thanks, Chris!

Author

Benjamin C Haller (bhaller@benhaller.com) and Philipp W Messer (messer@cornell.edu)

Examples

## This just brings up the documentation:
calcInbreedingLoad()