# NOT RUN {
# A) For bamAlign
align<-bamAlign("HWUSI-0001","ACCGGGTTTT","Qual/Strng","4M10N6M",refid=0,position=100)
countNucs(align)
# B) For bamRange
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam,idx=TRUE)
coords<-c(0,0,14730)
range<-bamRange(reader,coords)
countNucs(range)
# }
Run the code above in your browser using DataLab