Documentation for SLiM function calcPairHeterozygosity
, 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.
calcPairHeterozygosity(genome1, genome2, start, end, infiniteSites)
An object of type Genome object. Must be of length 1 (a singleton). See details for description.
An object of type Genome object. Must be of length 1 (a singleton). See details for description.
An object of type null or integer. Must be of length 1 (a
singleton). The default value is NULL
. See details for description.
An object of type null or integer. Must be of length 1 (a singleton).
The default value is NULL
. See details for description.
An object of type logical. Must be of length 1 (a
singleton). The default value is T
. See details for description.
An object of type float. Return will be of length 1 (a singleton)
Documentation for this function can be found in the official SLiM manual: page 752.
Calculates the heterozygosity for a pair of genomes; these will typically be the two genomes of a diploid individual (individual.genome1 and individual.genome2), but any two genomes may be supplied. The calculation can be narrowed to apply to only a window - a subrange of the full chromosome - by passing the interval bounds [start, end] for the desired window. In this case, the vector of mutations used for the calculation will be subset to include only mutations within the specified window. The default behavior, with start and end of NULL, provides the genome-wide heterozygosity. The implementation calcPairHeterozygosity(), viewable with functionSource(), treats every mutation as independent in the heterozygosity calculations by default (i.e., with infiniteSites=T). If mutations are stacked, the heterozygosity calculated therefore depends upon the number of unshared mutations, not the number of differing sites. Similarly, if multiple Mutation objects exist in different genomes at the same site (whether representing different genetic states, or multiple mutational lineages for the same genetic state), each Mutation object is treated separately for purposes of the heterozygosity calculation, just as if they were at different sites. One could regard these choices as embodying an infinite-sites interpretation of the segregating mutations. In most biologically realistic models, such genetic states will be quite rare, and so the impact of this choice will be negligible; however, in some models this distinction may be important. The behavior of calcPairHeterozygosity() can be switched to calculate based upon the number of differing sites, rather than the number of unshared mutations, by passing infiniteSites=F.
This is documentation for a function in the SLiM software, and has been reproduced from the official manual, which can be found here: http://benhaller.com/slim/SLiM_Manual.pdf. This documentation is Copyright © 2016-2020 Philipp Messer. All rights reserved. More information about SLiM can be found on the official website: https://messerlab.org/slim/
Other SLiMBuiltin:
SB
,
calcFST()
,
calcHeterozygosity()
,
calcInbreedingLoad()
,
calcVA()
,
calcWattersonsTheta()
,
codonsToAminoAcids()
,
mm16To256()
,
mmJukesCantor()
,
mmKimura()
,
nucleotideCounts()
,
nucleotideFrequencies()
,
nucleotidesToCodons()
,
summarizeIndividuals()
,
treeSeqMetadata()
## This just brings up the documentation:
calcPairHeterozygosity()