EVOLUTION-MANAGER
Edit File: sim.geno.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: Simulate genotypes given observed marker data</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 sim.geno {qtl}"><tr><td>sim.geno {qtl}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Simulate genotypes given observed marker data</h2> <h3>Description</h3> <p>Uses the hidden Markov model technology to simulate from the joint distribution Pr(g | O) where g is the underlying genotype vector and O is the observed multipoint marker data, with possible allowance for genotyping errors. </p> <h3>Usage</h3> <pre> sim.geno(cross, n.draws=16, 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>n.draws</code></td> <td> <p>Number of simulation replicates to perform.</p> </td></tr> <tr valign="top"><td><code>step</code></td> <td> <p>Maximum distance (in cM) between positions at which the simulated genotypes will be drawn, though for <code>step=0</code>, genotypes are drawn 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 simulations 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, Carter-Falconer, or Morgan 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>After performing the forward-backward equations, we draw from <i>Pr(g[1] = v | O)</i> and then <i>Pr(g[k+1] = v | O, g[k] = u)</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>draws</code>, added to each component of <code>cross$geno</code>. This is an array of size [n.ind x n.pos x n.draws] where n.pos is the number of positions at which the simulations were performed and n.draws is the number of replicates. Attributes <code>"error.prob"</code>, <code>"step"</code>, and <code>"off.end"</code> are set to the values of the corresponding arguments, for later reference. </p> <h3>Author(s)</h3> <p>Karl W Broman, <a href="mailto:broman@wisc.edu">broman@wisc.edu</a> </p> <h3>See Also</h3> <p><code><a href="calc.genoprob.html">calc.genoprob</a></code>, <code><a href="argmax.geno.html">argmax.geno</a></code> </p> <h3>Examples</h3> <pre> data(fake.f2) fake.f2 <- sim.geno(fake.f2, step=2, n.draws=8) </pre> <hr /><div style="text-align: center;">[Package <em>qtl</em> version 1.66 <a href="00Index.html">Index</a>]</div> </body></html>