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"))
cross
. See
read.cross
for details.step = 0
,
probabilities are calculated only at the marker locations."fixed"
; "variable"
is included for the qtlbim
package (http://www.ssg.uab.edu/qtlbim). The "max"
option inserts the minimal number of intermediate points so that the
maximum distance between points is step
.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 $ a[k][v] = log Pr(O[1], \ldots, O[k], g[k] = v)$ and $ b[k][v] = log Pr(O[k+1], \ldots, O[n] | g[k] = v)$
We then obtain $ Pr(g[k] | O[1], \ldots, O[n] = exp(a[k][v] + b[k][v]) / s$ where $ s = sum_v exp(a[k][v] + b[k][v])$
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.errorlod
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)
Run the code above in your browser using DataLab