# NOT RUN {
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam)
#
align<-getNextAlign(reader)
name(align)
position(align)
bamClose(reader)
#
# Open reader and initialize BAM-index
reader<-bamReader(bam,idx=TRUE)
indexInitialized(reader)
# }
Run the code above in your browser using DataLab