Learn R Programming

rbamtools (version 2.0.1)

windBack: windBack sets the current align of bamRange before the first align (=past the last align) in the bamRange align list.

Description

A bamRange object maintains a double-linked list of aligns and a pointer to a current align. windBack shifts the current align before the first align (=past the last align). When there is no align, nothing happens.

Usage

windBack(object)

Arguments

object
An object of class bamRange.

Value

  • NULL.

Examples

Run this code
library(rbamtools)
bam_file <- system.file("extdata", "accepted_hits.bam", package="rbamtools")
idx_file <- system.file("extdata", "accepted_hits.bam.bai", package="rbamtools")
reader<-bamReader(bam_file)
isOpen(reader)
loadIndex(reader,idx_file)
index.initialized(reader)
coords<-as.integer(c(0,0,1874))
range<-bamRange(reader,coords)
align<-getNextAlign(range)
align<-windBack(range)
align<-getNextAlign(range)
bamClose(reader)

Run the code above in your browser using DataLab