.get.quant.pos {CAGEr} | R 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))

[Package CAGEr version 2.0.2 Index]