splitRegions {regioneR} | R Documentation

## Split Regions

### Description

Splits a region set A by both ends of the regions in a second region set B.

### Usage

    splitRegions(A, B, min.size=1, track.original=TRUE)

### Arguments

`A` | a region set in any of the formats accepted by `toGRanges` (`GenomicRanges`, `data.frame`, etc...)
`B` | a region set in any of the formats accepted by `toGRanges` (`GenomicRanges`, `data.frame`, etc...)
`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

### Value

A GRanges with the splitted regions.

### See Also

`toDataframe`, `toGRanges`, `subtractRegions`, `commonRegions`, `extendRegions`, `joinRegions`, `mergeRegions`, `overlapRegions`

### Examples

    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)

[Package regioneR version 1.19.2 Index]