Learn R Programming

rbamtools (version 2.16.17)

headerReadGroup-class: Class "headerReadGroup": Representation of read - group data in header section of BAM files

Description

headerReadGroup represents data contained in the header section of BAM-files.

Arguments

Objects from the Class

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

Slots

nrg:

integer. Number of read groups.

%
ntl:

integer. Number of different read group tags (currently = 12).

%
ID:

character. Read group identifier. Each read group must have an unique ID.

%
CN:

character. Name of sequencing center.

%
DS:

character. Description.

%
DT:

character. Date of run.

%
FO:

character. Flow order.

%
KS:

character. Array of nucleotide bases.

%
LB:

character. Library.

%
PG:

character. Programs used for processing.

%
PI:

character. Predicted median insert size.

%
PL:

character. Platform/technology for production of reads.

%
PU:

character. Unique platform identifier.

%
SM:

character. Sample name.

Methods

addReadGroup

signature(object="headerReadGroup", l="list"): Adds new read group to object.

%
as.list

signature(x="headerReadGroup"): Returns data stored in this object as list.

%
getVal

signature(object="headerReadGroup"): Returns value of given segment.

%
setVal

signature(object="headerReadGroup"): Sets value of given segment.

%
getHeaderText

signature(.Object="headerReadGroup"): Returns textual representation of data as specified in SAM Format.

References

The SAM Format Specification (v1.4-r985). The SAM Format Specification Working Group. September 7, 2011.

Examples

Run this code
# NOT RUN {
bam <- system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam)
isOpen(reader)
header<-getHeader(reader)
htxt<-getHeaderText(header)
readGroup<-headerProgram(htxt)
getVal(readGroup,"ID")
setVal(readGroup,"ID","newID")
l<-as.list(readGroup)
txt<-getHeaderText(readGroup)
bamClose(reader)
# }

Run the code above in your browser using DataLab