| quantifyGenes {CAGEfightR} | R Documentation |
Obtain gene-level expression estimates by summing clusters annotated to the same gene. Unannotated transcripts (NAs) are discarded.
quantifyGenes(object, genes, inputAssay = "counts", sparse = FALSE)
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. |
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.
Other Quantification functions:
quantifyCTSSs2(),
quantifyCTSSs(),
quantifyClusters()
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)