overlapQuery: overlapQuery

Description Usage Arguments Value Examples

Description

Method for searching an IntervalTree object. Given a number or an ordered pair of numbers denoting the start and end of an interval, all intervals that overlapping the query interval in the IntervalTree object will be retrieved.

Usage

1
overlapQuery(theObject, anInterval)

Arguments

theObject

an IntervalTree object

anInterval

a vector of one or two numbers to check overlap, if two numbers are provided, they are treated as an interval (start, end).

Value

a list of vectors. Each vector contains information about an interval (name, start, end).

Examples

1
2
3
4
5
6
m_ranges <- data.frame(c("A", "B", "C", "D"), c(-1.1,2,3,4), c(5,4,6,10))

m_interval_tree <- new("IntervalTree", data=m_ranges, root=list())
overlapQuery(m_interval_tree, 4)
res <- overlapQuery(m_interval_tree, c(2.5,7))
res

rIntervalTree documentation built on May 2, 2019, 3:04 a.m.