R/peaks.R

## FIXME: should this go into IRanges? (rename to viewSummary?)
setGeneric("peakSummary", function(x, ...) standardGeneric("peakSummary"))

setMethod("peakSummary", "RleViews", function(x) {
  RangedData(ranges(x), max = viewMaxs(x), maxpos = mid(viewRangeMaxs(x)),
             sum = viewSums(x))
})
setMethod("peakSummary", "RleViewsList", function(x) {
  summaries <- unname(lapply(x, peakSummary))
  rd <- do.call(c, summaries)
  names(rd) <- names(x)[elementNROWS(summaries) > 0]
  rd
})

Try the chipseq package in your browser

Any scripts or data that you put into this service are public.

chipseq documentation built on Nov. 1, 2018, 4:30 a.m.