Description Usage Arguments Details Examples
The bamCountAll function takes a bamReader object and returns a data.frame. The data.frame contains the counts for all contained reference sequences. Because align numbers are counted for all reference sequences separately, the function needs to load a BAM index file.
1 | bamCountAll(object,verbose=FALSE)
|
object |
An instance of bamReader. Must be opened and contain initialized index. |
verbose |
Logical. Determines the amount of textual output during runtime. |
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.