cDPA: cDPA

Description Usage Arguments Author(s) Examples

Description

A constrained dynamic programming algorithm (cDPA) can be used to compute the best segmentation with respect to the Poisson likelihood, subject to a constraint on the number of segments, and the changes which must alternate: up, down, up, down, ...

Usage

1
cDPA(count, weight = rep(1, length(count)), maxSegments)

Arguments

count

Integer vector of count data to segment.

weight

Data weights (normally this is the number of base pairs).

maxSegments

Maximum number of segments to consider.

Author(s)

Toby Dylan Hocking, Guillem Rigaill

Examples

1
2
3
fit <- cDPA(c(0, 10, 11, 1), maxSegments=3)
stopifnot(fit$ends[3,4] == 3)
stopifnot(fit$ends[2,3] == 1)

Example output



PeakSegDP documentation built on May 1, 2019, 7:55 p.m.

Related to cDPA in PeakSegDP...