QuantileWidthFunctions: Get quantile positions

.get.quant.posR Documentation

Get quantile positions

Description

Private function that calculates position of quantiles for CTSS clusters based on distribution of tags within the clusters.

Usage

.get.quant.pos(cum.sums, clusters, q)

Arguments

cum.sums

Named list of vectors containing cumulative sum for each cluster (returned by the CTSScumulativesTagClusters or CTSScumulativesCC function).

clusters

TagClusters or ConsensusClusters object representing tag clusters or consensus clusters.

q

desired quantiles - single value or a vector of values.

Value

Returns the clusters object with one more metadata column per value in q, containing Rle integers giving the relative distance of the quantile boundaries to the start position.

Examples

cum.sums  <- RleList(`1` = Rle(1), `2` = cumsum(Rle(c(1, 1, 1, 2, 4, 0, 1, 1))))
clusters <- GRanges(c("chr1:100-101", "chr1:120-127"))
CAGEr:::.get.quant.pos(cum.sums, clusters, c(.2, .8))

charles-plessy/CAGEr documentation built on Nov. 4, 2023, 11:57 a.m.