getNextAlign-methods: 'getNextAlign': Retrieving next align from bamReader or...

Description Value Methods Author(s) Examples

Description

Returns an object of class bamAlign from bamReader or bamRange.

Value

An object of class bamAlign or NULL.

Methods

signature(object = "bamRange")

An instance of class bamRange.

signature(object = "bamReader")

An instance of class bamReader

Author(s)

Wolfgang Kaisers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
idx<-system.file("extdata","accepted_hits.bam.bai",package="rbamtools")
#
reader<-bamReader(bam)
isOpen(reader)
#
align<-getNextAlign(reader)
if(is.null(align))
    print("End of File!\n")
#
loadIndex(reader,idx)
indexInitialized(reader)
#
coords<-as.integer(c(0,0,249250621))
range<-bamRange(reader,coords)
align<-getNextAlign(range)
position(align)
#
bamClose(reader)

wokai/rbamtools documentation built on May 28, 2017, 5:12 a.m.