Calculate the distance to the median (DM) adjusted CV2 for a given RangedSummarizedExperiment object. Inspired by the method outlined in Kolodziejczyk et al., 2015, Cell Stem Cell.
Identify divergent loci from tag clusters with summit centering. The function is similar to divergentLociSummit but does not require tag clusters to be passed to the function. This is handeled internally by calling CAGEfightR::clusterUnidirectionally on the pooled CTSS signal.
Decompose tag cluster into subclusters according to CTSS expression fraction of local maxima CTSS expression. Performs local summit decomposition for each local maxima separately in decreasing order of expression level. For each local summit decomposition, subclusters will be merged if within maxGap distance. If smoothPad>0, neighbouring non-zero CTSSs within smoothPad distance of CTSSs fulfilling the summit fraction criterion will also be included. Final subclusters within mergeDist bp will be merged.
Remove singleton counts from a SummarizedExperiment object. Singleton counts are those that have a value of 1 in the specified assay. This function replaces those values with 0 and stores the modified assay in a new column.
Decompose tag cluster into subclusters according to CTSS expression fraction of summit CTSS expression. Subclusters within mergeDist bp will be merged.