countReads: Extract counts for RPFs and RNAs

Description Usage Arguments Value Examples

View source: R/countReads.R

Description

Calculate the reads counts for gene level or transcript level.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
countReads(
  RPFs,
  RNAs,
  gtf,
  level = c("tx", "gene"),
  bestpsite = 13,
  readsLen = c(28, 29),
  anchor = "5end",
  ...
)

Arguments

RPFs

Bam file names of RPFs.

RNAs

Bam file names of RNAseq.

gtf

GTF file name for annotation.

level

Transcript or gene level.

bestpsite

numeric(1). P site postion.

readsLen

numeric(1). reads length to keep.

anchor

5end or 3end. Default is 5end.

...

Parameters pass to featureCounts

Value

A list with reads counts.

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")
cnts <- countReads(RPFs[1], gtf=gtf, level="gene", readsLen=29)

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