| runHMM {CNOGpro} | R Documentation |
Implements a Viterbi algorithm for assigning most likely copy number to each chromosomal position in the chromosome.
runHMM(experiment, nstates = 5, changeprob = 1e-04, includeZeroState = T, errorRate = 0.001)
experiment |
An object of class |
nstates |
The possible number of states, not including state 0. The returned copy numbers will be in the range 0, 1, 2, ... , nstates |
changeprob |
The probability of transitioning from one state to another, used to set up the transition matrix. |
includeZeroState |
Whether or not to allow the copy number state 0 in the results |
errorRate |
The presumed fraction of erroneously mapped reads. Only needed when includeZeroState is set to TRUE. This numbers is used for setting the probability distribution of each observation in copy number state 0. |
For each read count observation the algorithm computes the probability of that observation in each possible state. The minimum path through the trellis is then calculated at the end.
An object of class CNOGpro, with a HMMtable listing the breakpoints
of different copy number states. The most probable states of each genetic
element are also listed in the genes table of the object.
Ola Brynildsrud
data(carsonella) carsonella_normalized <- normalizeGC(carsonella) carsonella_hmm <- runHMM(carsonella_normalized) plotCNOGpro(carsonella_hmm)