countReads: Extract counts for RPFs and RNAs

View source: R/countReads.R

countReadsR Documentation

Extract counts for RPFs and RNAs

Description

Calculate the reads counts for gene level or transcript level.

Usage

countReads(
  RPFs,
  RNAs,
  gtf,
  level = c("tx", "gene"),
  bestpsite = 13,
  readsLen = c(28, 29),
  anchor = "5end",
  ignore.seqlevelsStyle = FALSE,
  ...
)

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.

ignore.seqlevelsStyle

Ignore the sequence name style detection or not.

...

Parameters pass to featureCounts except isGTFAnnotationFile, GTF.attrType, and annot.ext.

Value

A list with reads counts.

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")
RNAs <- dir(path, "mRNA.*?.[12].bam$", full.names = TRUE)
cnts <- countReads(RPFs[1], gtf=gtf, level="gene", readsLen=29)
#cnts <- countReads(RPFs[1], RNAs[1], gtf=gtf, level="gene", readsLen=29)

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