splitRegions: Split Regions

Description Usage Arguments Value See Also Examples

View source: R/splitRegions.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
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)

regioneR documentation built on Nov. 8, 2020, 5 p.m.