peak_merge {primirTSS} | R Documentation

## Merge adjacent peaks within H3K4me3 or Pol II data.

### Description

Merge the adjacent segments provided as `GRange` object from original data. This function will merge adjacent peaks the distance between which is less than n base pairs apart and then return the merged segments.

### Usage

    peak_merge(peak, n = 250)

### Arguments

`peak` | A `GRange` object. The peaks to be merged from one certain ChIP-seq data, such as H3K4me3 data or Pol II data.
`n` | A number. `n` stipulates the distance(bp, base pair) between two seperate peaks within which they should be merged.

### Value

A GRanges object. The merged peaks for the following analysis to search for TSSs.

### Examples

    peak_df <- data.frame(chrom = c("chr1", "chr2", "chr1"),
                          chromStart = c(450, 460, 680),
                          chromEnd = c(470, 480, 710),
                          stringsAsFactors = FALSE)
    peak <-  as(peak_df, "GRanges")

    peak_merge(peak, n =250)

[Package primirTSS version 1.12.0 Index]