QuanBam: Quantify aligned Bam file

Description Usage Arguments Value Author(s) Examples

View source: R/QuanBam.R

Description

The function quantify a aligned Bam file from RNA-Seq with user-specified genome regions. The reads from bam file will be filtered by the regions. The output can be counts or maxdepths for each region.

Usage

1
QuanBam(bam, GR, method = "both", Reduce="union", ovtype = "within", revstrand = FALSE, ingene = FALSE, ...)

Arguments

bam

The aligned bam file from RNA-Seq experiment.

GR

GRange object with gene annotation.

method

The method to quantify reads. It can be count, maxdepth or both.

Reduce

The methods to reduce the overlapped regions. The regions from different transcripts but the same gene can be overlapped. If it is "union", the overlapped regions from the same gene will be united together. If it is "intersection", the returned object will be the most shared regions among the transcripts in the same gene. If it is NULL, all the regions will be quantified separately.

ovtype

The overlap type that reads map to genes. Only the reads mapping with the type can be used in the quantification. By default, the reads that aligned within the input regions is used. The other reads are filtered out. See more details in "type" section of help(findOverlaps).

revstrand

For paired reads. If TRUE, the paired reads that are in the same direction will be filtered out. If FALSE, the direction of reads will be ignored.

ingene

For paired reads. If TRUE, the paired reads that are not in the same gene will be filtered out. If FALSE, all the paired reads will be used.

...

More options when read bam file. See more details in help(readBamGappedAlignments)

Value

The results return a GRanges object. If reduce option is used, the return GRanges object is reduced ranges by gene_id. Columns "counts" or/and "maxdepths" will be added to the elementMetadata of the GRanges object.

Author(s)

Qiang Hu

Examples

1
2
3
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

qRNASeq documentation built on May 2, 2019, 4:26 p.m.