frameCounts {ribosomeProfilingQC} | R Documentation

## Extract counts for gene level or transcript level

### Description

Calculate the reads counts or coverage rate for gene level or transcript level. Coverage is determined by measuring the proportion of in-frame CDS positions with >= 1 reads.

### Usage

    frameCounts(
      reads,
      level = c("tx", "gene"),
      frame0only = TRUE,
      coverageRate = FALSE
    )

### Arguments

`reads` | Output of assignReadingFrame.
`level` | Transcript or gene level
`frame0only` | Only count for reading frame 0 or not
`coverageRate` | Calculate for coverage or not

### Value

A numeric vector with reads counts.

### Examples

    pcs <- readRDS(system.file("extdata", "samplePc.rds",
                   package="ribosomeProfilingQC"))
    cnts <- frameCounts(pcs)
    cnts.gene <- frameCounts(pcs, level="gene")
    cvg <- frameCounts(pcs, coverageRate=TRUE)

[Package ribosomeProfilingQC version 1.2.1 Index]