argmax.geno(cross, step=0, off.end=0, error.prob=0,
map.function=c("haldane","kosambi","c-f"))cross. See
read.cross for details.step = 0,
genotypes are reconstructed only at the marker locations.cross object in the input is returned with the reconstructed
genotypes added. Recall that the cross$geno component is a
list whose elements correspond to chromosomes and which are themselves
lists with components data and map. For each
chromosomes, an additional component, argmax, is added. This
is a matrix of size [n.ind x n.pos], where n.pos is the number of
positions at which the reconstructed genotypes were desired,
containing the most likely sequences of underlying genotypes.This done by calculating $\gamma_k(v_k) = \max_{v_1, \ldots, v_{k-1}} \Pr(g_1 = v_1, \ldots, g_k = v_k, O_1, \ldots, O_k)$ for $k = 1, \ldots, n$ and then tracing back through the sequence.
Calculations are done within the C function argmax_geno.
Attributes "error.prob", "step", and "off.end" are set to the values of the corresponding arguments, for later reference.
Note: the results of argmax.geno() depend greatly on the
choice of the value of the argument step. This is a sad truth
of the result of the Viterbi algoriothm. Further note that if several
sequences are all most likely, our method of choosing a random such is
flawed.
LR Rabiner (1989) A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE 77:257-286.
sim.geno, calc.genoprobdata(fake.f2)
fake.f2 <- argmax.geno(fake.f2,step=2,off.end=5)
<testonly>data(fake.bc)</testonly>
<testonly>fake.bc <- argmax.geno(fake.bc,step=0,off.end=0)</testonly>Run the code above in your browser using DataLab