bamAlign-class: Class '"bamAlign"'

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

Description

The bamAlign class represents the content of a single alignment stored in a BAM-file. An instance of this class can be created by reading an Alignment from an object of class bamReader or bamRange. Accessor functions allow reading and writing of object contents. The alignment can be rewritten to a BAM-file via a bamWriter object or stored in a bamRange object.

Objects from the Class

Objects can be created by calls of the form new("bamAlign", alignment).

Slots

align:

Object of class "externalptr"

Methods

alignQual

signature(object = "bamAlign"): Returns quality scores of aligned read (one for each query-base). Will be reverse of raw if aligned to reverse strand.

alignSeq

signature(object = "bamAlign"): Returns base sequence of the aligned read. Will be reverse complement of raw if aligned to reverse strand.

readQual

signature(object = "bamAlign"): Returns quality scores of raw read prior to alignment (one for each query-base).

readSeq

signature(object = "bamAlign"): Returns base sequence of raw read prior to alignment.

cigarData

signature(object = "bamAlign"): Returns data.frame with listed cigar items.

failedQC

signature(object = "bamAlign"): Gets flag item.

failedQC<-

signature(object = "bamAlign"): Sets flag item.

firstInPair

signature(object = "bamAlign"): Gets flag item.

firstInPair<-

signature(object = "bamAlign"): Sets flag item.

flag

signature(object = "bamAlign"): Retrieves 16-bit flag values which contains information of all flags in binary form.

flag<-

signature(object = "bamAlign"): Sets 16-bit flag value (all flags at once).

getTag

signature(object = "bamAlign", tag="character"): Retrieves the value of the given tag as a character string, or "" if 'tag' not found.

getAllTags

signature(object = "bamAlign", sep="character"): Retrieves the complete descriptors of all tags as a character string, with with 'sep' inserted between tags.

initialize

signature(.Object = "bamAlign"): Initializes bamAlign object

insertSize

signature(object = "bamAlign"): Returns insertSize value.

mapQuality

signature(object = "bamAlign"): Returns mapQuality value.

matePosition

signature(object = "bamAlign"): Returns mate Position value.

mateRefID

signature(object = "bamAlign"): Returns mateRefID value.

mateReverseStrand

signature(object = "bamAlign"): Gets flag item.

mateReverseStrand<-

signature(object = "bamAlign"): Sets flag item.

mateUnmapped

signature(object = "bamAlign"): Gets flag item.

mateUnmapped<-

signature(object = "bamAlign"): Sets flag item.

readID

signature(object = "bamAlign"): Returns align read Identifier.

nCigar

signature(object = "bamAlign"): Returns number of cigar items in align.

paired

signature(object = "bamAlign"): Gets flag item.

paired<-

signature(object = "bamAlign"): Sets flag item.

pcrORopt_duplicate

signature(object = "bamAlign"): Gets flag item.

pcrORopt_duplicate<-

signature(object = "bamAlign"): Sets flag item.

position

signature(object = "bamAlign"): Returns align position (on Ref-Sequence).

properPair

signature(object = "bamAlign"): Gets flag item.

properPair<-

signature(object = "bamAlign"): Sets flag item.

refID

signature(object = "bamAlign"): Returns (0-based) ID of Reference Sequence (As indicated by ID column returned by getRefData).

reverseStrand

signature(object = "bamAlign"): Gets flag item.

reverseStrand<-

signature(object = "bamAlign"): Sets flag item.

secondaryAlign

signature(object = "bamAlign"): Gets flag item.

secondaryAlign<-

signature(object = "bamAlign"): Sets flag item.

secondInPair

signature(object = "bamAlign"): Gets flag item.

secondInPair<-

signature(object = "bamAlign"): Sets flag item.

unmapped

signature(object = "bamAlign"): Gets flag item.

unmapped<-

signature(object = "bamAlign"): Sets flag item.

Author(s)

Wolfgang Kaisers

References

The SAM Format Specification (v1.4-r985). The SAM Format Specification Working Group. September 7, 2011. http://www.samtools.sourceforge.net/SAM1.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(rbamtools)
# retrieve align from file
bam<-system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam)
align<-getNextAlign(reader)
bamClose(reader)
# use some accessors
readID(align)
refID(align)
position(align)
nCigar(align)
cigarData(align)
alignSeq(align)
alignQual(align)
reverseStrand(align)
reverseStrand(align)<-TRUE
reverseStrand(align)

robertdouglasmorrison/DuffyNGS documentation built on Dec. 7, 2018, 8:01 a.m.