coverageDepth: Extract coverage depth for gene level or transcript level

Description Usage Arguments Value Examples

View source: R/coverageDepth.R

Description

Calculate the coverage depth for gene level or transcript level. Coverage for RPFs will be the best P site coverage. Coverage for RNAs will be the coverage for 5'end of reads.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
coverageDepth(
  RPFs,
  RNAs,
  gtf,
  level = c("tx", "gene"),
  bestpsite = 13,
  readsLen = c(28, 29),
  anchor = "5end",
  region = "cds",
  ext = 5000,
  ...
)

Arguments

RPFs

Bam file names of RPFs.

RNAs

Bam file names of RNAseq.

gtf

GTF file name for annotation or a TxDb object.

level

Transcript or gene level.

bestpsite

P site postion.

readsLen

Reads length to keep.

anchor

5end or 3end. Default is 5end.

region

Annotation region. It could be "cds", "utr5", "utr3", "exon", "transcripts", "feature with extension".

ext

Extesion region for "feature with extension".

...

Parameters pass to makeTxDbFromGFF

Value

A cvgd object with coverage depth.

Examples

1
2
3
4
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")
cvgs <- coverageDepth(RPFs[1], gtf=gtf, level="gene")

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