Learn R Programming

rbamtools (version 2.16.17)

bamHeaderText-class: Class "bamHeader": Textual representation of header section of BAM files.

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").

Slots

com:

character

head:

headerLine

dict:

refSeqDict

group:

headerReadGroup

prog:

headerProgram

Methods

headerLine

signature(x = "bamHeader"): Gets headerLine object.

%
headerLine<-

signature(x = "bamHeader"): Sets headerLine object.

%
refSeqDict

signature(object = "bamHeader"): Gets refSeqDict object.

%
refSeqDict<-

signature(object = "bamHeader"): Sets refSeqDict object.

%
headerReadGroup

signature(object = "bamHeader"): Gets headerReadGroup object.

%
headerReadGroup<-

signature(object = "bamHeader"): Sets headerReadGroup object.

%
headerProgram

signature(.Object = "bamHeader"): Gets headerProgram object.

%
headerProgram<-

signature(.Object = "bamHeader"): Sets headerProgram object.

%
getHeaderText

signature(.Object = "bamHeader"): Returns whole information encoded in a character string as described in SAM Format Specification.

Examples

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