Learn R Programming

rbamtools (version 2.1.0)

gapList-class: Class "gapList"

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).

Arguments

Objects from the Class

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

Examples

Run this code
library(rbamtools)
bam<-system.file("extdata", "accepted_hits.bam", package="rbamtools")
idx<-paste(bam,"bai",sep=".")
# Open BAM file
reader<-bamReader(bam)
# Load BAM index file
loadIndex(reader,idx)
coords<-as.integer(c(0,0,249250621))
gl<-gapList(reader,coords)
df<-as.data.frame(gl)
head(df)
bamClose(reader)

Run the code above in your browser using DataLab