Get all sequences lengths for each ranges of a GRanges object.
Examples
GRange.grn <- GenomicRanges::GRanges(
seqnames = S4Vectors::Rle(c("chr1", "chr2", "chr1"), c(1, 3, 1)),
ranges = IRanges::IRanges(101:105, end = 111:115,
names = letters[seq_len(5)]),
strand = S4Vectors::Rle(BiocGenerics::strand(c("-", "+", "*", "+")),
c(1, 1, 2, 1)),
seqinfo = c(chr1 = 200, chr2 = 300),
score = seq_len(5)
)
SeqEnds(GRange.grn)
#> chr1 chr2 chr2 chr2 chr1
#> 200 300 300 300 200