Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

twoMarkerDistribution

Genotype probability distribution


Description

Computes the joint genotype distribution of two markers for a specified pedigree member, conditional on existing genotypes and pedigree information.

Usage

twoMarkerDistribution(x, id, partialmarker1, partialmarker2, theta,
  loop_breakers = NULL, eliminate = 99, verbose = TRUE)

Arguments

x

A linkdat object.

id

The individual in question.

partialmarker1, partialmarker2

Either a single integer indicating the number of one of x's existing markers, or a marker object.

theta

A single numeric in the interval [0, 0.5] - the recombination fraction between the two markers.

loop_breakers

A numeric containing IDs of individuals to be used as loop breakers. Relevant only if the pedigree has loops. See breakLoops.

eliminate

A non-negative integer, indicating the number of iterations in the internal genotype-compatibility algorithm. Positive values can save time if partialmarker is non-empty and the number of alleles is large.

verbose

A logical.

Value

A named matrix giving the joint genotype distribution.

Author(s)

Magnus Dehli Vigeland

See Also

Examples

x = nuclearPed(2)
emptySNP = marker(x, alleles=c('a','b'))
SNP1 = marker(x, 1, c(1,1), 2, c(1,0), alleles=1:2, afreq=c(0.1, 0.9))
twoMarkerDistribution(x, id=2, emptySNP, SNP1, theta=0)
twoMarkerDistribution(x, id=2, emptySNP, SNP1, theta=0.5)
twoMarkerDistribution(x, id=3, emptySNP, SNP1, theta=0.5)

# X-linked example
SNPX_1 = marker(x, 2, c('a','b'), 3, 'b', alleles=c('a','b'), chrom=23)
SNPX_2 = marker(x, 2, c('a','b'), 3, 'b', alleles=c('a','b'), chrom=23)
r1 = twoMarkerDistribution(x, id=4, SNPX_1, SNPX_2, theta=0)
r2 = twoMarkerDistribution(x, id=4, SNPX_1, SNPX_2, theta=0.5)
stopifnot(all(r1==c(.5,0,0,.5)), all(r2==c(.25,.25,.25,.25)))

paramlink

Parametric Linkage and Other Pedigree Analysis in R

v1.1-2
GPL (>= 2)
Authors
Magnus Dehli Vigeland [aut, cre], Thore Egeland [ctb], Guro Doerum [ctb]
Initial release
2018-01-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.