EVOLUTION-MANAGER
Edit File: calc.genoprob.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Calculate conditional genotype probabilities</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for calc.genoprob {qtl}"><tr><td>calc.genoprob {qtl}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Calculate conditional genotype probabilities</h2> <h3>Description</h3> <p>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. </p> <h3>Usage</h3> <pre> 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")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>cross</code></td> <td> <p>An object of class <code>cross</code>. See <code><a href="read.cross.html">read.cross</a></code> for details.</p> </td></tr> <tr valign="top"><td><code>step</code></td> <td> <p>Maximum distance (in cM) between positions at which the genotype probabilities are calculated, though for <code>step = 0</code>, probabilities are calculated only at the marker locations.</p> </td></tr> <tr valign="top"><td><code>off.end</code></td> <td> <p>Distance (in cM) past the terminal markers on each chromosome to which the genotype probability calculations will be carried.</p> </td></tr> <tr valign="top"><td><code>error.prob</code></td> <td> <p>Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).</p> </td></tr> <tr valign="top"><td><code>map.function</code></td> <td> <p>Indicates whether to use the Haldane, Kosambi or Carter-Falconer map function when converting genetic distances into recombination fractions.</p> </td></tr> <tr valign="top"><td><code>stepwidth</code></td> <td> <p>Indicates whether the intermediate points should with fixed or variable step sizes. We recommend using <code>"fixed"</code>; <code>"variable"</code> was included for the qtlbim package (<a href="https://cran.r-project.org/src/contrib/Archive/qtlbim">https://cran.r-project.org/src/contrib/Archive/qtlbim</a>). The <code>"max"</code> option inserts the minimal number of intermediate points so that the maximum distance between points is <code>step</code>.</p> </td></tr> </table> <h3>Details</h3> <p>Let <i>O[k]</i> denote the observed marker genotype at position <i>k</i>, and <i>g[k]</i> denote the corresponding true underlying genotype. </p> <p>We use the forward-backward equations to calculate <i> a[k][v] = log Pr(O[1], …, O[k], g[k] = v)</i> and <i> b[k][v] = log Pr(O[k+1], …, O[n] | g[k] = v)</i> </p> <p>We then obtain <i> Pr(g[k] | O[1], …, O[n] = exp(a[k][v] + b[k][v]) / s</i> where <i> s = sum_v exp(a[k][v] + b[k][v])</i> </p> <p>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. </p> <h3>Value</h3> <p>The input <code>cross</code> object is returned with a component, <code>prob</code>, added to each component of <code>cross$geno</code>. <code>prob</code> 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 <code>"error.prob"</code>, <code>"step"</code>, <code>"off.end"</code>, and <code>"map.function"</code> are set to the values of the corresponding arguments, for later reference (especially by the function <code><a href="calc.errorlod.html">calc.errorlod</a></code>). </p> <h3>Author(s)</h3> <p>Karl W Broman, <a href="mailto:broman@wisc.edu">broman@wisc.edu</a> </p> <h3>References</h3> <p>Lange, K. (1999) <em>Numerical analysis for statisticians</em>. Springer-Verlag. Sec 23.3. </p> <p>Rabiner, L. R. (1989) A tutorial on hidden Markov models and selected applications in speech recognition. <em>Proceedings of the IEEE</em> <b>77</b>, 257–286. </p> <h3>See Also</h3> <p><code><a href="sim.geno.html">sim.geno</a></code>, <code><a href="argmax.geno.html">argmax.geno</a></code>, <code><a href="calc.errorlod.html">calc.errorlod</a></code> </p> <h3>Examples</h3> <pre> data(fake.f2) fake.f2 <- calc.genoprob(fake.f2, step=2, off.end=5) data(fake.bc) fake.bc <- calc.genoprob(fake.bc, step=0, off.end=0, err=0.01) </pre> <hr /><div style="text-align: center;">[Package <em>qtl</em> version 1.46-2 <a href="00Index.html">Index</a>]</div> </body></html>