# NOT RUN {
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam,idx=TRUE)
getRefData(reader)
getRefCount(reader)
getRefId(reader, "chr1")
coords<-getRefCoords(reader, "chr1")
rg<-bamRange(reader,coords)
bamClose(reader)
# }
Run the code above in your browser using DataLab