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

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 
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.
signature(intervals = "data.frame")
intervals$start
and intervals$end
give the interval start/end positions.
signature(intervals = "IRanges")
start(intervals)
and end(intervals)
give the interval start/end positions.
signature(intervals = "matrix")
The columns start
and end
in intervals
give the interval start/end positions
signature(intervals = "RangedData")
start(intervals)
and end(intervals)
give the interval start/end positions.
signature(intervals = "RleViews")
start(intervals)
and end(intervals)
give the interval start/end positions.
David Rossell
1 2 3 4 5  st < c(10,20,1000)
intervals < RangedData(IRanges(st,st+10),space='chr1')
intervals
mergeRegions(intervals,maxDist=300)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.