joinRegions | R Documentation |
Joins the regions from a region set A that are less than min.dist
bases apart.
joinRegions(A, min.dist=1)
A |
a region set in any of the accepted formats by |
min.dist |
an integer indicating the minimum distance required between two regions in order to not fuse them. Any pair of regions closer than |
It returns a GenomicRanges
object with the regions resulting from the joining process.
All metadata (additional columns in the region set in addition to chromosome, start and end) will be ignored and not present in the returned region set.
The implementation relies completely in the reduce
function from IRanges
package.
plotRegions
, toDataframe
, toGRanges
, subtractRegions
, splitRegions
, extendRegions
, commonRegions
, mergeRegions
, overlapRegions
A <- data.frame("chr1", c(1, 10, 20, 30), c(12, 13, 28, 40))
join1 <- joinRegions(A)
join2 <- joinRegions(A, min.dist=3)
join3 <- joinRegions(A, min.dist=10)
plotRegions(list(A, join1, join2, join3), chromosome="chr1", regions.labels=c("A", "join1", "join2", "join3"), regions.colors=4:1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.