peak_merge: Merge adjacent peaks within H3K4me3 or Pol II data.

Description Usage Arguments Value Examples

View source: R/peak_merge.R

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

1
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

1
2
3
4
5
6
7
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)

primirTSS documentation built on Nov. 8, 2020, 7:11 p.m.