firstEndPerGroup: Get first end per granges group

View source: R/grl_helpers.R

firstEndPerGroupR Documentation

Get first end per granges group

Description

grl must be sorted, call ORFik:::sortPerGroup if needed

Usage

firstEndPerGroup(grl, keep.names = TRUE)

Arguments

grl

a GRangesList

keep.names

a boolean, keep names or not, default: (TRUE)

Value

a Rle(keep.names = T), or integer vector(F)

Examples

gr_plus <- GRanges(seqnames = c("chr1", "chr1"),
                   ranges = IRanges(c(7, 14), width = 3),
                   strand = c("+", "+"))
gr_minus <- GRanges(seqnames = c("chr2", "chr2"),
                    ranges = IRanges(c(4, 1), c(9, 3)),
                    strand = c("-", "-"))
grl <- GRangesList(tx1 = gr_plus, tx2 = gr_minus)
firstEndPerGroup(grl)

JokingHero/ORFik documentation built on April 7, 2024, 2:59 a.m.