summit_peak {FunChIP} | R Documentation

## Finding the summits of the peaks of the GRanges object

### Description

It identifies the summit of the peak and stores it in a new metadata column.

### Usage

    ## S4 method for signature 'GRanges'
    summit_peak(object, summit = NULL, rescale = FALSE)

### Arguments

`object` | GRanges object of length N. If `summit` is not provided, `object` must contain the metadata column `spline`.
`summit` | vector of length N. It contains the x coordinate of the summit of the peaks, i.e. the distance of the summit from the starting position of the spline approximation of peak (distance from `start_spline`). If `summit` is `NULL` the summit of each peak is identified as the maximum point of the `spline`.
`rescale` | logical. If `TRUE` the distance among scaled peaks is computed. For the definition of scaled peaks see smooth_peak.

### Value

the GRanges object with the new metadata column `summit_spline`. In case of `rescale = TRUE` an extra metadata column `summit_spline_rescaled` is added, containing the summit of the scaled peak.

### Author(s)

Alice Parodi, Marco J. Morelli, Laura M. Sangalli, Piercesare Secchi, Simone Vantini

### Examples

    # load the data
    data(peaks)

    # Computing the summits of the peaks from
    # the spline-smoothed approximation.

    peaks.spline.summit <- summit_peak(peaks.data.smooth)

[Package FunChIP version 1.20.0 Index]