countReads {ribosomeProfilingQC} | R 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",
      ...
    )

### 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

    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)

[Package ribosomeProfilingQC version 1.2.1 Index]