R/intervals.R
gintervals.quantiles.Rd
Calculates quantiles of a track expression for intervals.
gintervals.quantiles(
expr = NULL,
percentiles = 0.5,
intervals = NULL,
iterator = NULL,
band = NULL,
intervals.set.out = NULL
)
track expression for which quantiles are calculated
an array of percentiles of quantiles in [0, 1] range
set of intervals
track expression iterator. If 'NULL' iterator is determined implicitly based on track expressions.
track expression band. If 'NULL' no band is used.
intervals set name where the function result is optionally outputted
If 'intervals.set.out' is 'NULL' a set of intervals with additional columns representing quantiles for each percentile.
This function calculates quantiles of 'expr' for each interval in 'intervals'.
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()
intervs <- gintervals(c(1, 2), 0, 5000)
gintervals.quantiles("dense_track",
percentiles = c(0.5, 0.3, 0.9), intervs
)
#> chrom start end 0.5 0.3 0.9
#> 1 chr1 0 5000 0.04 0.020 0.16
#> 2 chr2 0 5000 0.08 0.034 0.18