Description Usage Arguments Details Examples
The bamCount function takes a bamReader object, a set of reference coordinates and the 'complex' argument and returns an integer vector.
1 | bamCount(object,coords)
|
object |
An instance of bamReader. Must be opened and contain initialized index. |
coords |
Integer vector of length 3: coords=c(refid, start, stop) |
The method returns integer vector of length 10. Entries 1 to 9 contain the number of CIGAR-OP items found in the given range. The 10th entry is the total number of aligns in the range. The returned vector is named. The names of the vector are "M", "I","N","S","H","P","=","X" and nAligns. The first 9 names are the abbreviations for CIGAR-OP items which are defined in the SAM file format reference.
1 2 3 4 5 6 | bam <- system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam,idx=TRUE)
coords<-getRefCoords(reader,"chr1")
count<-bamCount(reader,coords)
count
bamClose(reader)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.