Skip to content
forked from tdhock/PeakSegDP

Peak detection via Constrained Optimal Segmentation (Dynamic Programming algorithm)

Notifications You must be signed in to change notification settings

Antsci/PeakSegDP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

testshttps://travis-ci.org/tdhock/PeakSegDP.png?branch=master

PeakSeg is a constrained maximum Poisson likelihood segmentation model described in ”PeakSeg: constrained optimal segmentation and supervised penalty learning for peak detection in count data” (source). We proposed a constrained Dynamic Programming Algorithm (cDPA) for computing a model that satisfies the PeakSeg constraints.

Installation

if(!require(devtools))install.packages("devtools")
devtools::install_github("tdhock/PeakSegDP")

Usage

There are two main functions for computing the constrained segmentation model:

  • cDPA is a low-level interface to the C solver. Its inputs are N weighted data points and S, the maximum number of segments. It outputs a list with components named loss, ends, and mean (S x N matrices describing the solution).
  • PeakSegDP is a more user-friendly wrapper of the cDPA. Its input parameter is P, the maximum number of peaks, which implies S = P*2+1. Its input data type is a data.frame with columns count, chromStart, chromEnd. It outputs a list of data.frames, peaks, error, segments, breaks.

Related work

  • As explained in our ICML paper, the cDPA is a quadratic time algorithm that is not guaranteed to find the global optimum. For a linear time algorithm that recovers the global optimum, use the coseg package.
  • For supervised peak detection in ChIP-seq data sets with several samples, see our newer method, PeakSegJoint.

About

Peak detection via Constrained Optimal Segmentation (Dynamic Programming algorithm)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 73.6%
  • C 24.4%
  • Shell 2.0%