Learn R Programming

misha (version 4.3.12)

gintervals.normalize: Normalize intervals to a fixed size

Description

This function normalizes intervals by computing their centers and then expanding them to a fixed size, while ensuring they don't cross chromosome boundaries.

Usage

gintervals.normalize(intervals = NULL, size = NULL, intervals.set.out = NULL)

Value

Normalized intervals set with fixed size, or NULL if result is saved to intervals.set.out

Arguments

intervals

intervals set

size

target size for normalized intervals (must be positive integer)

intervals.set.out

intervals set name where the function result is saved. If NULL, the result is returned to the user.

See Also

gintervals.force_range

Examples

Run this code
# \dontshow{
options(gmax.processes = 2)
# }

gdb.init_examples()
intervs <- gintervals(1, c(1000, 5000), c(2000, 6000))
gintervals.normalize(intervs, 500)

Run the code above in your browser using DataLab