View source: R/intervals-operations.R
| gintervals.normalize | R Documentation |
This function normalizes intervals by computing their centers and then expanding them to fixed or variable sizes, while ensuring they don't cross chromosome boundaries.
gintervals.normalize(intervals = NULL, size = NULL, intervals.set.out = NULL)
intervals |
intervals set |
size |
target size(s) for normalized intervals. Can be either:
|
intervals.set.out |
intervals set name where the function result is saved. If NULL, the result is returned to the user. |
Normalized intervals set with fixed or variable sizes, or NULL if result is saved to intervals.set.out
gintervals.force_range
gdb.init_examples()
# Single size (all intervals normalized to 500bp)
intervs <- gintervals(1, c(1000, 5000), c(2000, 6000))
gintervals.normalize(intervs, 500)
# Vector of sizes (each interval gets its own size)
intervs <- gintervals(1, c(1000, 3000, 5000), c(2000, 4000, 6000))
gintervals.normalize(intervs, c(500, 1000, 750))
# One-to-many: single interval with multiple sizes
interv <- gintervals(1, 1000, 2000)
gintervals.normalize(interv, c(500, 1000, 1500))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.