gintervals.remove_overlaps | R Documentation |
Remove overlapping intervals by selecting one interval per overlap group
gintervals.remove_overlaps(intervals, select = c("first", "last", "random"))
intervals |
intervals set |
select |
how to select intervals from each group: "first", "last", or "random" (default: "first") |
The intervals set with overlapping intervals removed, keeping one interval per group based on the selection method
## Not run:
# Create sample overlapping intervals
intervs <- data.frame(
chrom = "chr1",
start = c(11000, 100, 10000, 10500),
end = c(12000, 200, 13000, 10600),
data = c(10, 20, 30, 40)
)
# Remove overlaps keeping first interval in each group
non_overlapping <- gintervals.remove_overlaps(intervs)
# Remove overlaps keeping random interval from each group
non_overlapping <- gintervals.remove_overlaps(intervs, select = "random")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.