This function normalizes intervals by computing their centers and then expanding them to a fixed size, while ensuring they don't cross chromosome boundaries.
gintervals.normalize(intervals = NULL, size = NULL, intervals.set.out = NULL)Normalized intervals set with fixed size, or NULL if result is saved to intervals.set.out
gdb.init_examples()
intervs <- gintervals(1, c(1000, 5000), c(2000, 6000))
gintervals.normalize(intervs, 500)
#> chrom start end
#> 1 chr1 1250 1750
#> 2 chr1 5250 5750