Entering edit mode
6.0 years ago
endrebak852
▴
110
library(GenomicRanges)
gr0 <- GRanges(Rle(c("chr2", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)), IRanges(1:10, width=10:1))
union(gr0, gr0)
# GRanges object with 3 ranges and 0 metadata columns:
# seqnames ranges strand
# <Rle> <IRanges> <Rle>
# [1] chr2 [1, 10] *
# [2] chr1 [5, 10] *
# [3] chr3 [7, 10] *
# -------
# seqinfo: 3 sequences from an unspecified genome; no seqlengths
The union operation is binary. Is there a unary union method?