translationalEfficiency: Translational Efficiency

Description Usage Arguments Value Examples

View source: R/translationalEfficiency.R

Description

Calculate Translational Efficiency (TE). TE is defined as the ratios of the absolute level of ribosome occupancy devided by RNA levels for transcripts.

Usage

1
2
3
4
5
6
7
8
9
translationalEfficiency(
  x,
  window,
  RPFsampleOrder,
  mRNAsampleOrder,
  pseudocount = 1,
  log2 = FALSE,
  normByLibSize = FALSE
)

Arguments

x

Output of getFPKM or normByRUVs. if window is set, it must be output of coverageDepth.

window

numeric(1). window size for maximal counts.

RPFsampleOrder, mRNAsampleOrder

Sample order of RPFs and mRNAs. The parameters are used to make sure that the order of RPFs and mRNAs in cvgs is corresponding samples.

pseudocount

The number will be add to sum of reads count to avoid X/0.

log2

Do log2 transform or not.

normByLibSize

Normlization by library size or not. If window size is provied and normByLibSize is set to TRUE, the coverage will be normalized by library size.

Value

A list with RPFs, mRNA levels and TE as a matrix with translational efficiency

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
path <- system.file("extdata", package="ribosomeProfilingQC")
RPFs <- dir(path, "RPF.*?\\.[12].bam$", full.names=TRUE)
RNAs <- dir(path, "mRNA.*?\\.[12].bam$", full.names=TRUE)
gtf <- file.path(path, "Danio_rerio.GRCz10.91.chr1.gtf.gz")
cnts <- countReads(RPFs, RNAs, gtf, level="gene")
fpkm <- getFPKM(cnts)
te <- translationalEfficiency(fpkm)

## End(Not run)

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