PeaksToGRanges {MACPET} | R Documentation

## Convert peaks to GRanges object

### Description

`PeaksToGRanges` converts peaks of an object of `PSFit` class to `GRanges` object.

### Usage

    PeaksToGRanges(object, ...)

    ## Default S3 method:
    PeaksToGRanges(object, ...)

    ## S3 method for class 'PSFit'
    PeaksToGRanges(object, threshold = NULL, ...)

    ## S4 method for signature 'PSFit'
    PeaksToGRanges(object, threshold = NULL, ...)

### Arguments

`object` | An object of class `PSFit`.
`...` | Further arguments to be passed to `PeaksToGRanges` (not used).
`threshold` | A numeric with the FDR cut-off threshold used to take a subset of significant peaks. If `threshold=NULL` then all the peaks are returned.

### Details

`PeaksToGRanges` converts peak information into a `GRanges` object. Each row in the `GRanges` object represents a peak with 'CIQ.Up.start' and 'CIQ.Down.end' as start and end coordinates, respectively (see `PSFit`) Metadata will also include information for the total PETs, the p-value and the FDR of each peak.

### Value

For `PSFit` class, a `GRanges` object created by the estimated peak information including metadata columns for the total PETs, the p-value and the FDR of each peak.

### Author(s)

Ioannis Vardaxis, ioannis.vardaxis@ntnu.no

### References

Vardaxis I, Drabløs F, Rye M and Lindqvist BH (2018). MACPET: Model-based Analysis for ChIA-PET. To be published.

### See Also

`PSFit`, `PeaksToNarrowPeak`

### Examples

    #load Self-ligated data: (class=PSFit)
    load(system.file('extdata', 'MACPET_psfitData.rda', package = 'MACPET'))
    class(MACPET_psfitData)
    PeaksToGRanges(object=MACPET_psfitData,threshold=1e-5)

[Package MACPET version 1.10.0 Index]