bamReader: bamReader: Connection to BAM file for reading access.

Description Usage Arguments Author(s) Examples

View source: R/rbamtools.R

Description

The bamReader function constructs and returns an S4 object of class bamReader. The bamReader object represents a connection to an opened BAM-file. When an indexname is given or idx=TRUE, the function tries to load an existing BAM-index.

Usage

1
bamReader(filename,indexname,idx=FALSE,verbose=0)

Arguments

filename

Filename of BAM-file to be opened for reading.

indexname

Optional: Name of BAM-index file

idx

Logical

verbose

Numeric: Quantifies the extent of textual feedback (levels: 0,1,2).

Author(s)

Wolfgang Kaisers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam)
#
align<-getNextAlign(reader)
name(align)
position(align)
bamClose(reader)
#
# Open reader and initialize BAM-index
reader<-bamReader(bam,idx=TRUE)
indexInitialized(reader)

rbamtools documentation built on Nov. 11, 2019, 5:09 p.m.