Learn R Programming

regioneR (version 1.4.0)

uniqueRegions: Unique Regions

Description

Returns the regions unique to only one of the two region sets, that is, all parts of the genome covered by only one of the two region sets.

Usage

uniqueRegions(A, B)

Arguments

A
a region set in any of the accepted formats by toGRanges (GenomicRanges, data.frame, etc...)
B
a region set in any of the accepted formats by toGRanges (GenomicRanges, data.frame, etc...)

Value

It returns a GenomicRanges object with the regions unique to one of the region sets.

See Also

toGRanges, subtractRegions, commonRegions, mergeRegions

Examples

Run this code
A <- data.frame("chr1", c(1, 10, 20, 30), c(12, 13, 28, 40))

B <- data.frame("chr1", 25, 35)

uniques <- uniqueRegions(A, B)

plotRegions(list(A, B, uniques), chromosome="chr1", regions.labels=c("A", "B", "uniques"), regions.colors=3:1)

Run the code above in your browser using DataLab