countReads: count mapped reads overlap genomic intervals

View source: R/countReads.R

countReadsR Documentation

count mapped reads overlap genomic intervals

Description

This function counts mapped reads from multiple BAM files overlapping genomic intervals in genomicFeature in a TCA object. The resulted count table is stored in count slot of the TCA object.

Usage

countReads(object, dir, method = "summarizeoverlaps", zero.based = TRUE, ...)

Arguments

object

a TCA object.

dir

character string giving the directory of BAM files.

method

character string giving the counting method. Options are "summarizeOverlaps" and "featureCounts". For Windows system, only "summarizeOverlaps" can be used, For Linux system, both methods can be used.

zero.based

Logical. If TRUE, the start positions of the genomic intervals are 0-based, if FALSE, the start positions will be 1-based.

...

additional arguments passed to summarizeOverlaps in GenomicAlignments package or featureCounts in Rsubread package.

Details

This function provides two options to count the mapped reads: "summarizeOverlaps" in the GenomicAlignments package and "featureCounts" in the Rsubread package. As Rsubread package is only avaible for linux systems, Windows users can only choose "summarizeOverlaps". The user could further customize the counting paramters by passing additional arguments (...), otherwise the default settings of the two methods will be used. For details of the counting parameters, see summarizeOverlaps, featureCounts.

Value

A TCA object with updated count slot.

Author(s)

Mengjun Wu

See Also

summarizeOverlaps, featureCounts


MengjunWu/TCseq documentation built on May 15, 2023, 9:47 p.m.