# NOT RUN {
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam)
header<-getHeader(reader)
bamClose(reader)
htxt<-getHeaderText(header)
headLine<-headerLine(htxt)
headerLine(htxt)<-headLine
readGroup<-headerReadGroup(htxt)
headerReadGroup(htxt)<-readGroup
headProg<-headerProgram(htxt)
headerProgram(htxt)<-headProg
headTxt<-getHeaderText(htxt)
# }
Run the code above in your browser using DataLab