codonBias: Codon usage bias

View source: R/codonBias.R

codonBiasR Documentation

Codon usage bias

Description

Calculate the codon usage for the reads in the identified CDSs. And then compared to the reference codon usage.

Usage

codonBias(
  RPFs,
  gtf,
  genome,
  bestpsite = 13,
  readsLen = c(28, 29),
  anchor = "5end",
  ignore.seqlevelsStyle = FALSE,
  summary = TRUE,
  removeDuplicates = TRUE,
  ...
)

Arguments

RPFs

Bam file names of RPFs.

gtf

GTF file name for annotation or a TxDb object.

genome

A BSgenome object.

bestpsite

P site postion.

readsLen

Reads length to keep.

anchor

5end or 3end. Default is 5end.

ignore.seqlevelsStyle

Ignore the sequence name style detection or not.

summary

Return the summary of codon usage bias or full list.

removeDuplicates

Remove the PCR duplicates or not. Default TRUE.

...

Parameters pass to makeTxDbFromGFF

Value

A list of data frame of codon count table if summary is TRUE. list 'reads' means the counts by raw reads. list 'reference' means the counts by sequence extracted from reference by the coordinates of mapped reads. Otherwise, return the counts (reads/reference) table for each reads.

Examples

path <- system.file("extdata", package="ribosomeProfilingQC")
RPFs <- dir(path, "RPF.*?\\.[12].bam$", full.names=TRUE)
gtf <- file.path(path, "Danio_rerio.GRCz10.91.chr1.gtf.gz")
library(BSgenome.Drerio.UCSC.danRer10)
cb <- codonBias(RPFs[c(1,2)], gtf=gtf, genome=Drerio)

jianhong/ribosomeProfilingQC documentation built on April 15, 2024, 7:10 p.m.