Learn R Programming

rbamtools (version 2.4.0)

bamHeaderText-class: Class "bamHeader"

Description

bamHeader manages textual representation of data contained in the header section of BAM-files.The binary representation (from which new BAM-files can be created) is encapsulated in class 'bamHeader'. Both types can be converted into each other.

Arguments

Objects from the Class

Objects can be created by calls of the form hl<-new("bamHeader").

Examples

Run this code
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