| peak_merge {primirTSS} | R Documentation |
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.
peak_merge(peak, n = 250)
peak |
A |
n |
A number. |
A GRanges object. The merged peaks for the following analysis to search for TSSs.
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)