Merge nearby chromosomal regions.
Description
Merges regions that are less than maxDist
bases apart.
Usage
1  mergeRegions(intervals, chromosome, score, annot, aggregateFUN='median', maxDist=300)

Arguments
intervals 
Object indicating start and end of each region. It
can either be a 
chromosome 
Chromosome that the region belongs to (optional). If supplied, must be of the same length as 
score 
Numerical score for each interval. Scores in merged
intervals are aggregated using function 
annot 
Character indicating annotation information for each interval. Annotations in merged intervals are pasted in a single string (annotations appearing in more than one interval are only reported once in the merged interval). 
aggregateFUN 
Function to aggregate 
maxDist 
Regions less than 
Value
The result is returned in a data.frame
indicating the start and
end of each merged interval. If the arguments were provided, the information in
chromosome
, score
and annot
is provided in
additional columns.
If the input argument intervals
was of class RangedData
, the results are returned in a RangedData
object.
Methods
signature(intervals = "data.frame")

intervals$start
andintervals$end
give the interval start/end positions. signature(intervals = "IRanges")

start(intervals)
andend(intervals)
give the interval start/end positions. signature(intervals = "matrix")
The columns
start
andend
inintervals
give the interval start/end positionssignature(intervals = "RangedData")

start(intervals)
andend(intervals)
give the interval start/end positions. signature(intervals = "RleViews")

start(intervals)
andend(intervals)
give the interval start/end positions.
Author(s)
David Rossell
Examples
1 2 3 4 5  st < c(10,20,1000)
intervals < RangedData(IRanges(st,st+10),space='chr1')
intervals
mergeRegions(intervals,maxDist=300)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.