splitRegions {regioneR} | R Documentation |
Splits a region set A by both ends of the regions in a second region set B.
splitRegions(A, B, min.size=1, track.original=TRUE)
A |
a region set in any of the formats accepted by |
B |
a region set in any of the formats accepted by |
min.size |
numeric value, minimal size of the new regions |
track.original |
logical indicating if you want to keep the original regions and additional information in the output |
A GRanges with the splitted regions.
toDataframe
, toGRanges
, subtractRegions
, commonRegions
, extendRegions
, joinRegions
, mergeRegions
, overlapRegions
A <- data.frame(chr=1, start=c(1, 15, 24, 40, 50), end=c(10, 20, 30, 45, 55)) B <- data.frame(chr=1, start=c(2, 12, 28, 35), end=c(5, 25, 33, 43)) splits <- splitRegions(A, B) plotRegions(list(A, B, splits), chromosome=1, regions.labels=c("A", "B", "splits"), regions.colors=3:1)