sMLH: Calculate multilocus heterozygosity (MLH)

Description Usage Arguments Value Author(s) References Examples

View source: R/sMLH.R

Description

sMLH is defined as the total number of heterozygous loci in an individual divided by the sum of average observed heterozygosities in the population over the subset of loci successfully typed in the focal individual.

Usage

1
sMLH(genotypes)

Arguments

genotypes

data.frame with individuals in rows and loci in columns, containing genotypes coded as 0 (homozygote), 1 (heterozygote) and NA (missing)

Value

Vector of individual standardized multilocus heterozygosities

Author(s)

Martin A. Stoffel (martin.adam.stoffel@gmail.com)

References

Coltman, D. W., Pilkington, J. G., Smith, J. A., & Pemberton, J. M. (1999). Parasite-mediated selection against inbred Soay sheep in a free-living, island population. Evolution, 1259-1267.

Examples

1
2
3
data(mouse_msats)
genotypes <- convert_raw(mouse_msats)
het <- sMLH(genotypes)

inbreedR documentation built on Feb. 2, 2022, 5:09 p.m.