Learn R Programming

qtl (version 1.70)

calc.genoprob: Calculate conditional genotype probabilities

Description

Uses the hidden Markov model technology to calculate the probabilities of the true underlying genotypes given the observed multipoint marker data, with possible allowance for genotyping errors.

Usage

calc.genoprob(cross, step=0, off.end=0, error.prob=0.0001,
              map.function=c("haldane","kosambi","c-f","morgan"),
              stepwidth=c("fixed", "variable", "max"))

Value

The input cross object is returned with a component,

prob, added to each component of cross$geno.

prob is an array of size [n.ind x n.pos x n.gen] where n.pos is the number of positions at which the probabilities were calculated and n.gen = 3 for an intercross, = 2 for a backcross, and = 4 for a 4-way cross. Attributes "error.prob", "step",

"off.end", and "map.function" are set to the values of the corresponding arguments, for later reference (especially by the function calc.errorlod).

Arguments

cross

An object of class cross. See read.cross for details.

step

Maximum distance (in cM) between positions at which the genotype probabilities are calculated, though for step = 0, probabilities are calculated only at the marker locations.

off.end

Distance (in cM) past the terminal markers on each chromosome to which the genotype probability calculations will be carried.

error.prob

Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).

map.function

Indicates whether to use the Haldane, Kosambi or Carter-Falconer map function when converting genetic distances into recombination fractions.

stepwidth

Indicates whether the intermediate points should with fixed or variable step sizes. We recommend using "fixed"; "variable" was included for the qtlbim package (https://cran.r-project.org/src/contrib/Archive/qtlbim/). The "max" option inserts the minimal number of intermediate points so that the maximum distance between points is step.

Author

Karl W Broman, broman@wisc.edu

Details

Let \(O_k\) denote the observed marker genotype at position \(k\), and \(g_k\) denote the corresponding true underlying genotype.

We use the forward-backward equations to calculate \(\alpha_{kv} = \log Pr(O_1, \ldots, O_k, g_k = v)\) and \(\beta_{kv} = \log Pr(O_{k+1}, \ldots, O_n | g_k = v)\)

We then obtain \(Pr(g_k | O_1, \ldots, O_n) = \exp(\alpha_{kv} + \beta_{kv}) / s\) where \(s = \sum_v \exp(\alpha_{kv} + \beta_{kv})\)

In the case of the 4-way cross, with a sex-specific map, we assume a constant ratio of female:male recombination rates within the inter-marker intervals.

References

Lange, K. (1999) Numerical analysis for statisticians. Springer-Verlag. Sec 23.3.

Rabiner, L. R. (1989) A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE 77, 257--286.

See Also

sim.geno, argmax.geno, calc.errorlod

Examples

Run this code
data(fake.f2)
fake.f2 <- subset(fake.f2,chr=18:19)
fake.f2 <- calc.genoprob(fake.f2, step=2, off.end=5)

data(fake.bc)
fake.bc <- subset(fake.bc,chr=18:19)
fake.bc <- calc.genoprob(fake.bc, step=0, off.end=0, err=0.01)

Run the code above in your browser using DataLab