Description Usage Arguments Details Value Note Examples
Finds the intersections of a data line with a given threshold
1 | findIntersections(data, thr)
|
data |
(GRanges with y mcol) A GRanges with the data points |
thr |
(numeric) The value at wich we want to calculate the intersections |
Given a GRanges with an mcol with name "y" representing the values. This function will return a GRanges with the points intersecting a specific value "thr".
A GRanges representing the intersection points between the data line and the threshold. It will return an empty GRanges if the line does not intersect the threshold.
Important: It will only return the intersection points where the line crosses the threshold but not if a data point lies exactly at the threshold.
1 2 3 4 5 6 | d <- toGRanges(c("1:1-1", "1:5-5", "1:15-15"))
d$y <- c(-2, 3, 1)
findIntersections(d, 1.5)
findIntersections(d, 0)
findIntersections(d, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.