twoMarkerDistribution: Genotype distribution for two linked markers

Description Usage Arguments Value Author(s) See Also Examples

View source: R/twoMarkerDistribution.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
twoMarkerDistribution(
  x,
  id,
  partialmarker1,
  partialmarker2,
  rho,
  loop_breakers = NULL,
  eliminate = 99,
  verbose = TRUE
)

Arguments

x

A ped object.

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.

loop_breakers

(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

A non-negative integer, indicating the number of iterations in the internal algorithm for reducing the genotype space. Positive values can save time if partialmarker1 and/or partialmarker2 have many alleles.

verbose

A logical.

Value

A named matrix giving the joint genotype distribution.

Author(s)

Magnus Dehli Vigeland

See Also

oneMarkerDistribution()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 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 = c(1,1), alleles = 1:2)

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

# Genotype distribution for the brother: Depends on rho
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)

pedprobr documentation built on Nov. 13, 2020, 5:06 p.m.