frameCounts: Extract counts for gene level or transcript level

Description Usage Arguments Value Examples

View source: R/frameCounts.R

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

1
2
3
4
5
6
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

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

ribosomeProfilingQC documentation built on March 13, 2021, 2:01 a.m.