refSeqDict-class: Class '"refSeqDict"': Repesentation of data from reference...

Description Objects from the Class Slots Methods Author(s) References Examples

Description

refSeqDict represents Data contained in the header section of BAM-files.

Objects from the Class

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

Slots

SN:

character

LN:

numeric

AS:

character

M5:

numeric

SP:

character

UR:

character

Methods

dim

signature(x="refSeqDict"): Returns dimension of data: number of rows and 6 columns.

as.data.frame

signature(object="refSeqDict"): Combines data of Slots to data.frame.

coerce

signature(from="bamRange", to="data.frame"): Coercion of refSeqDice to data.frame.

removeSeqs

signature(object="refSeqDict",rows="numeric"): Removes reference sequence (i.e. one row from data.frame) entry.

addSeq

signature(.Object="refSeqDict",SN,LN,AS,M5,SP,UR): Adds reference sequence (i.e. one row in data.frame) entry.

head

signature(.Object="refSeqDict",n): Returns head of data.frame representation.

tail

signature(.Object="refSeqDict",n): Returns tail of data.frame representation.

getHeaderText

signature(.Object="refSeqDict"): Returns textual representation of data stored in this class as desrcribed in SAM Format Specification.

Author(s)

Wolfgang Kaisers

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
bam <- system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam)
isOpen(reader)
header<-getHeader(reader)
htxt<-getHeaderText(header)
refSeqs<-refSeqDict(htxt)
dim(refSeqs)
ht<-getHeaderText(refSeqs)
df<-as.data.frame(refSeqs)
addSeq(refSeqs,SN="nextSeqName",LN=1000)
removeSeqs(refSeqs,3)
bamClose(reader)

rbamtools documentation built on Nov. 11, 2019, 5:09 p.m.