quantifyClusters {CAGEfightR} | R Documentation |
Quantify expression of clusters (TSSs or enhancers) by summing CTSSs within clusters.
quantifyClusters(object, clusters, inputAssay = "counts", sparse = FALSE)
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. |
RangedSummarizedExperiment with row corresponding to clusters. seqinfo and colData is copied over from object.
Other Quantification functions: quantifyCTSSs
,
quantifyGenes
# 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)