Class "gapList": Representation of genomic alignment gaps.

Share:

Description

The gapList class represents a list of Alignment gaps (i.e. N-items in Cigar-data). For each gap, the type of left and right adjacent Cigar items is reported plus size of each. The list can be converted into a data.frame which then contains the columns: refid, position (which identify the align), left_cigar_len,left_cigar_type, left_stop (characterize the left boundary) and right_start, right_cigar_len, right_cigar_type (characterize the right boundary). The adjacent cigar-types should be 0 (i.e. M=match). 'left_stop' is the 0-based position of last exon nucleotide, right_start is the 0-based position of the first exon nucleotide.

Objects from the Class

Objects can be created by calls of the form gapList(reader,coords)).

Slots

list:

"externalptr". Point to double linked list struct.

Methods

size

signature(x="gapList"): Returns number of gapped-align items in list.

coerce

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

as.data.frame

signature(x="gapList", row.names=NULL, optional=FALSE): Coercion of gapList to data.frame.

show

signature(object="gapList"): Prints a short message with some summarizing data.

nAligns

signature(object="gapList"): Returns number of aligns in specified Range.

nAlignGaps

signature(object="gapList"): Returns number of align gaps in specified Range.

Author(s)

Wolfgang Kaisers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Open (indexed) BAM file
bam<-system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam,idx=TRUE)
coords<-getRefCoords(reader,"chr1")
gl<-gapList(reader,coords)
size(gl)
nAligns(gl)
nAlignGaps(gl)
gl
dfr<-as.data.frame(gl)
# coerce
dfr<-as(gl,"data.frame")
head(df)
bamClose(reader)

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