# NOT RUN {
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam)
header<-getHeader(reader)
htxt<-getHeaderText(header)
headLine<-headerLine(htxt)
getVal(headLine,"VN")
getVal(headLine,"SO")
setVal(headLine,"SO","unsorted")
l<-as.list(headLine)
txt<-getHeaderText(headLine)
bamClose(reader)
# }
Run the code above in your browser using DataLab