combine-GenomicRanges-GenomicRanges-method: Combining GRanges objects

Description Usage Arguments Details Value Author(s) Examples

Description

Combine multiple GenomicRanges objects.

Usage

1
2
## S4 method for signature 'GenomicRanges,GenomicRanges'
combine(x, y, ...)

Arguments

x

A GenomicRanges object.

y

A GenomicRanges object.

...

One or more GenomicRanges objects.

Details

Combines two or more GenomicRanges objects so that the resulting GenomicRanges object contains all elements of the original objects. Elements in the returned value are unique, that is, an element represented in multiple arguments is represented only only in the result. To perform this operation, combine() makes sure that data in shared elements, including metadata columns accessible with mcols() and names accessible with names(), are identical in all the GenomicRanges objects. Data differences in shared elements usually cause an error. Shared elements are identified using findMatches().

Value

A GenomicRanges object.

Author(s)

Peter Hickey, peter.hickey@gmail.com

Examples

1
2
3
4
5
6
7
8
x <- GRanges(seqnames = c("chr1", "chr2"),
               ranges = IRanges(c(1, 11), c(11, 20)),
               seqinfo = Seqinfo(c("chr1", "chr2", "chr3")))
y <- GRanges(seqnames = c("chr2", "chr3"),
               ranges = IRanges(c(11, 21), c(20, 30)),
               seqinfo = Seqinfo(c("chr1", "chr2", "chr3")))
# x[2] (resp. y[1]) is only included once in the combined object
combine(x, y)

PeteHaitch/SparseSummarizedExperiment documentation built on May 8, 2019, 1:31 a.m.