associated_peaks {target} | R Documentation

## Predict associated peaks

### Description

This function selects overlapping peaks and regions, calculates the distance between them and score each peak.

### Usage

    associated_peaks(peaks, regions, regions_col, base = 1e+05)

### Arguments

`peaks` | A GRanges object
`regions` | A GRanges object
`regions_col` | A character string
`base` | An integer to calculate distances relative to.

### Value

A GRanges object. A similar object to peaks with three added metadata columns.

### Examples

    # load peaks and transcripts data
    data("real_peaks")
    data("real_transcripts")

    # associated peaks
    ap <- associated_peaks(real_peaks, real_transcripts, 'name2')

[Package target version 1.4.0 Index]