pile: Get IDs of intervals covering each sub-interval

View source: R/functions.R

pileR Documentation

Get IDs of intervals covering each sub-interval

Description

Get the intervals overlapping each section as a list.

Usage

pile(x, interval_names = rownames(x), output = "list")

Arguments

x

Integer matrix of two columns, the first column giving the (inclusive) start points of intervals and the second column giving the corresponding (exclusive) end points.

interval_names

Character vector of names for each interval, not necessarily unique. If they are not unique, one might wish to lapply unique to the list of members for each sub-interval returned by this function. Defaults to the rownames of x.

output

Character value either "list" or "vector" determining whether a named list of interval index/name vectors or flat vector of members (corresponding to the output of depth) is returned.

Value

See notes on output parameter.

Examples

pile(cbind(1:10, 11:20))

IntervalSurgeon documentation built on April 15, 2023, 5:07 p.m.