quantifyGenes {CAGEfightR} | R Documentation

## Quantify expression of genes

### Description

Obtain gene-level expression estimates by summing clusters annotated to the same gene. Unannotated transcripts (NAs) are discarded.

### Usage

    quantifyGenes(object, genes, inputAssay = "counts", sparse = FALSE)

### Arguments

`object` | RangedSummarizedExperiment: Cluster-level expression values.
`genes` | character: Name of column in rowData holding gene IDs (NAs will be discarded).
`inputAssay` | character: Name of assay holding 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 rows corresponding to genes. Location of clusters within genes is stored as a GRangesList in rowRanges. seqinfo and colData is copied over from object.

### See Also

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

### Examples

    data(exampleUnidirectional)

    # Annotate clusters with geneIDs:
    library(TxDb.Mmusculus.UCSC.mm9.knownGene)
    txdb <- TxDb.Mmusculus.UCSC.mm9.knownGene
    exampleUnidirectional <- assignGeneID(exampleUnidirectional,
                                          geneModels=txdb,
                                          outputColumn='geneID')

    # Quantify counts within genes:
    quantifyGenes(exampleUnidirectional, genes='geneID', inputAssay='counts')

    # For exceptionally large datasets,
    # the resulting count matrix can be left sparse:
    quantifyGenes(exampleUnidirectional,
                  genes='geneID',
                  inputAssay='counts',
                  sparse=TRUE)

[Package CAGEfightR version 1.10.0 Index]