Class "bamAlign": Representation of single genomic alignments.

Share:

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 read (one for each query-base).

alignSeq

signature(object="bamAlign"): Returns base sequence (of read).

cigarData

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

failedQC

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

failedQC<-

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

firstInPair

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

firstInPair<-

signature(object="bamAlign", value="logical"): 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).

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", value="logical"): Sets mateReverseStrand item.

mateUnmapped

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

mateUnmapped<-

signature(object="bamAlign", value="logical"): Sets mateUnmapped item.

name

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

nCigar

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

paired

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

paired<-

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

pcrORopt_duplicate

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

pcrORopt_duplicate<-

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

position

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

properPair

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

properPair<-

signature(object="bamAlign", value="logical"): 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", value="logical"): Sets flag item.

secondaryAlign

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

secondaryAlign<-

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

secondInPair

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

secondInPair<-

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

suppAlign

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

suppAlign<-

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

unmapped

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

unmapped<-

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

Author(s)

Wolfgang Kaisers

References

The SAM Format Specification (16ede77). The SAM Format Specification Working Group. September 12, 2014.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Retrieve align from file
bam<-system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam)
align<-getNextAlign(reader)
bamClose(reader)

# Use accessors
name(align)
refID(align)
position(align)
nCigar(align)
cigarData(align)
alignSeq(align)
alignQual(align)
alignQualVal(align)
reverseStrand(align)
reverseStrand(align) <- TRUE
reverseStrand(align)
suppAlign(align)
suppAlign(align) <- TRUE

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.