calc.genoprob(cross, step=0, off.end=0, error.prob=0.0001,
map.function=c("haldane","kosambi","c-f","morgan"))cross. See
read.cross for details.step = 0,
probabilities are calculated only at the marker locations.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).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.
Rabiner, L. R. (1989) A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE 77, 257--286.
sim.geno, argmax.geno,
calc.errorloddata(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