Learn R Programming

CAGEr (version 1.14.0)

quantilePositions: Determining positions of CAGE signal quantiles within genomic region

Description

Calculates positions of quantiles of CAGE signal along tag clusters or consensus clusters in each CAGE dataset within CAGEset object. The function calculates positions of both "lower" and "upper" quantiles as described in Details.

Usage

quantilePositions(object, clusters, qLow = 0.1, qUp = 0.9, useMulticore = FALSE, nrCores = NULL)

Arguments

object
A CAGEset object
clusters
Which clusters should be used. Can be either "tagClusters" to calculate positions of quantiles in tag clusters (different set of genomic coordinates for every CAGE experiment) or "consensusClusters" to calculate positions of quantiles in consensus clusters (same set of genomic coordinates for every CAGE experiment).
qLow
Which "lower" quantiles should be calculated. It has to be a numeric vector of values in range [0,1]. See Details.
qUp
Which "upper" quantiles should be calculated. It has to be a numeric vector of values in range [0,1]. See Details.
useMulticore
Logical, should multicore be used. useMulticore = TRUE is supported only on Unix-like platforms.
nrCores
Number of cores to use when useMulticore = TRUE. Default value NULL uses all detected cores.

Value

When clusters = "tagClusters", the slots tagClustersQuantileLow and tagClustersQuantileUp of the provided CAGEset object will be occupied with the positions of specified quantiles in all tag clusters for all CAGE datasets. When clusters = "consensusClusters" the slots consensusClustersQuantileLow and consensusClustersQuantileUp will be occupied by the corresponding information for consensus clusters.

Details

Position of the "lower" quantile qLow is defined as a point that divides the genomic region into two parts, so that the 5' part contains < qLow * 100% of the CAGE signal of that region. Accordingly, position of the "upper" quantile qUp is defined as a point that divides the genomic region into two parts so that the 5' part contains >= qUp * 100% of the CAGE signal of that region. Positions of one "lower" and one "upper" quantile (when qLow <= qup<="" code="">) define a central part of the genomic region that contains >= (qUp - qLow) * 100% of the CAGE signal of that region. Width of that central part is refered to as "interquantile width", which is a more robust measure of the promoter width than the total span of the region.

Examples

Run this code
load(system.file("data", "exampleCAGEset.RData", package="CAGEr"))

quantilePositions(object = exampleCAGEset, clusters = "tagClusters",
qLow = c(0.1,0.2), qUp = c(0.8,0.9))

Run the code above in your browser using DataLab