bamCountAll: bamCountAll

Description Usage Arguments Details Examples

Description

The bamCountAll function takes a bamReader object and returns a data.frame. The data.frame contains the counts for all contained reference sequences.

Usage

1
bamCountAll(object,verbose=FALSE)

Arguments

object

An instance of bamReader. Must be opened and contain initialized index.

verbose

Logical. Determines the amount of textual output during runtime.

Details

The method returns a data.frame. Each row contains count data for one reference sequence. Each column contains the counts for one CIGAR-OP type ("M", "I","N","S","H","P","=","X"). Columns with the total number of aligns, the refid (ID) and the length of the reference sequence (LN), as retrieved by 'getRefData' are added.

Examples

1
2
3
4
5
6
library(rbamtools)
bam <- system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam,idx=TRUE)
count<-bamCountAll(reader,verbose=TRUE)
count
bamClose(reader)

wokai/rbamtools documentation built on May 28, 2017, 5:12 a.m.