Description Usage Arguments Details Value Author(s) Examples

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

1 2 | ```
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

1 2 3 4 | ```
data(carsonella)
carsonella_normalized <- normalizeGC(carsonella)
carsonella_hmm <- runHMM(carsonella_normalized)
plotCNOGpro(carsonella_hmm)
``` |

```
Loading required package: seqinr
Normalizing read counts for GC bias...
Overall values for chromosome CP003467 :
Median read count: 66
Median GC percentage: 0.17
Calculating per-read weight based on GC percentage...
Successfully normalized chromosome CP003467
Running HMM...
Analyzing chromosome CP003467
Finished setting up transition and emission matrices. Starting Viterbi algorithm...
Attempting to create Viterbi matrix
Positions 1 - 18800 : Most probable state = 1
Positions 18801 - 22000 : Most probable state = 2
Positions 22001 - 94200 : Most probable state = 1
Positions 94201 - 95200 : Most probable state = 0
Positions 95201 - 174014 : Most probable state = 1
Finished running Viterbi algorithm. Assigning most probable states to individual segments...
Copy number analysis complete. Use print to access results.
```

CNOGpro documentation built on May 2, 2019, 5:57 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.