quantifyClusters {CAGEfightR} | R Documentation

## Quantify expression of clusters (TSSs or enhancers) by summing CTSSs within clusters.

### Description

Quantify expression of clusters (TSSs or enhancers) by summing CTSSs within clusters.

### Usage

    quantifyClusters(object, clusters, inputAssay = "counts", sparse = FALSE)

### Arguments

`object` | RangedSummarizedExperiment: CTSSs.
`clusters` | GRanges: Clusters to be quantified.
`inputAssay` | character: Name of assay holding expression values to be quantified (usually counts).
`sparse` | logical: If the input is a sparse matrix, TRUE will keep the output matrix sparse while FALSE will coerce it into a normal matrix.

### Value

RangedSummarizedExperiment with row corresponding to clusters. seqinfo and colData is copied over from object.

### See Also

Other Quantification functions: `quantifyCTSSs2()`, `quantifyCTSSs()`, `quantifyGenes()`

### Examples

    # CTSSs stored in a RangedSummarizedExperiment:
    data(exampleCTSS)

    # Clusters to be quantified as a GRanges:
    data(exampleUnidirectional)
    clusters <- rowRanges(exampleUnidirectional)

    # Quantify clusters:
    quantifyClusters(exampleCTSSs, clusters)

    # For exceptionally large datasets,
    # the resulting count matrix can be left sparse:
    quantifyClusters(exampleCTSSs, rowRanges(exampleUnidirectional), sparse=TRUE)

[Package CAGEfightR version 1.7.5 Index]