50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

pedprobr (version 0.9.2)

twoMarkerDistribution: Genotype distribution for two linked markers

Description

Computes the joint genotype distribution of two markers for a specified pedigree member, conditional on known genotypes and the recombination rate between the markers.

Usage

twoMarkerDistribution(
  x,
  id,
  partialmarker1,
  partialmarker2,
  rho = NULL,
  loopBreakers = NULL,
  eliminate = 0,
  verbose = TRUE
)

Value

A named matrix giving the joint genotype distribution.

Arguments

x

A ped object or a list of such.

id

A single ID label.

partialmarker1, partialmarker2

Either a marker object, or the name (or index) of a marker attached to x.

rho

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

loopBreakers

(Only relevant if the pedigree has loops). A vector with ID labels of individuals to be used as loop breakers. If NULL (default) loop breakers are selected automatically. See breakLoops().

eliminate

Deprecated, not used.

verbose

A logical.

Author

Magnus Dehli Vigeland

See Also

oneMarkerDistribution()

Examples

Run this code

# A sib-pair pedigree
x = nuclearPed(children = c("bro1", "bro2"))

# Two SNP markers; first brother homozygous for the `1` allele
SNP1 = SNP2 = marker(x, bro1 = "1/1", afreq = c("1" = 0.5, "2" = 0.5))

plot(x, marker = list(SNP1, SNP2))

# Genotype distribution for the brother depends on linkage
twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0)
twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0.5)

# X-linked
chrom(SNP1) = chrom(SNP2) = "X"

plot(x, marker = list(SNP1, SNP2))

twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0)
twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0.5)

Run the code above in your browser using DataLab