tile1: Tile each GRangesList group to 1-base resolution.

Description Usage Arguments Value See Also Examples

View source: R/ranges_helpers.R

Description

Will tile a GRangesList into single bp resolution, each group of the list will be splited by positions of 1. Returned values are sorted as the same groups as the original GRangesList, except they are in bp resolutions. This is not supported originally by GenomicRanges for GRangesList.

Usage

1
tile1(grl, sort.on.return = TRUE, matchNaming = TRUE)

Arguments

grl

a GRangesList object with names

sort.on.return

logical (T), should the groups be sorted before return.

matchNaming

logical (T), should groups keep unlisted names and meta data.(This make the list very big, for > 100K groups)

Value

a GRangesList grouped by original group, tiled to 1

See Also

Other ExtendGenomicRanges: asTX(), coveragePerTiling(), extendLeaders(), extendTrailers(), reduceKeepAttr(), txSeqsFromFa(), windowPerGroup()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
gr1 <- GRanges("1", ranges = IRanges(start = c(1, 10, 20),
                                     end = c(5, 15, 25)),
               strand = "+")
gr2 <- GRanges("1", ranges = IRanges(start = c(20, 30, 40),
                                     end = c(25, 35, 45)),
               strand = "+")
names(gr1) = rep("tx1_1", 3)
names(gr2) = rep("tx1_2", 3)
grl <- GRangesList(tx1_1 = gr1, tx1_2 = gr2)
tile1(grl)

ORFik documentation built on March 27, 2021, 6 p.m.