Learn R Programming

CNOGpro (version 1.1)

runHMM: Copy number variation inference through a Hidden Markov Model

Description

Implements a Viterbi algorithm for assigning most likely copy number to each chromosomal position in the chromosome.

Usage

runHMM(experiment, nstates = 5, changeprob = 1e-04, includeZeroState = T, errorRate = 0.001)

Arguments

experiment
An object of class CNOGpro
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.

Value

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.

Details

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.

Examples

Run this code
data(carsonella)
carsonella_normalized <- normalizeGC(carsonella)
carsonella_hmm <- runHMM(carsonella_normalized)
plotCNOGpro(carsonella_hmm)

Run the code above in your browser using DataLab