R/intervals.R
gintervals.2d.band_intersect.Rd
Intersects two-dimensional intervals with a band.
gintervals.2d.band_intersect(
intervals = NULL,
band = NULL,
intervals.set.out = NULL
)
If 'intervals.set.out' is 'NULL' a data frame representing the intervals.
This function intersects each two-dimensional interval from 'intervals' with 'band'. If the intersection is not empty, the interval is shrunk to the minimal rectangle that contains the band and added to the return value.
If 'intervals.set.out' is not 'NULL' the result is saved as an intervals set. Use this parameter if the result size exceeds the limits of the physical memory.
gdb.init_examples()
gintervals.2d.band_intersect(gintervals.2d(1), c(10000, 20000))
#> chrom1 start1 end1 chrom2 start2 end2
#> 1 chr1 10000 5e+05 chr1 0 490000