as_ranges: Coerce an Rle or RleList object to Ranges

View source: R/ranges-construct.R

as_rangesR Documentation

Coerce an Rle or RleList object to Ranges

Description

Coerce an Rle or RleList object to Ranges

Usage

as_ranges(.data)

Arguments

.data

a Rle() or an RleList() object.

Details

This function is behind compute_coverage().

Value

an IRanges() object if the input is an Rle() object or a GRanges() object for an RleList() object.

See Also

S4Vectors::Rle(), IRanges::RleList()

Examples

x <- S4Vectors::Rle(10:1, 1:10)
as_ranges(x)

# must have names set
y <- IRanges::RleList(chr1 = x)
as_ranges(y)


sa-lee/plyranges documentation built on April 15, 2024, 12:25 p.m.