rbamtools-package: Reading, writing and manipulating BAM-file format.

Description Details Author(s) References Examples

Description

BAM is Binary (Sequence) Alignment/Map format. Many sequence alignment products which align second generation sequence reads to a genomic reference (such as the human genome) use BAM-file format as output. Analysis of results of a sequence alignment requires reading and interpreting BAM-files and sometimes manipulating BAM-files. The rbamtools package provides a R-interface to the samtools C-library by Heng Li.

Details

Package: rbamtools
Type: Package
Version: 2.0
Date: 2012-02-03
License: Artistic 2.0 + MIT License (see LICENSE in src/samtools subdirectory)
LazyLoad: yes
Depends: methods

The package is organized in S4 classes. Four classes represent the data and organize the defined functionality:

bamReader Reading aligns from a BAM-file
bamAlign Single BAM alignment (including Data accessor functions)
bamRange (Linked-) List container for BAM alignments
bamWriter Writing alings to a BAM-file
gapList (Linked-) List container for alignment gaps.

Author(s)

Wolfgang Kaisers Maintainer: Wolfgang Kaisers <kaisers@med.uni-duesseldorf.de>

References

The SAM Format Specification (v1.4-r985). The SAM Format Specification Working Group. September 7, 2011. Li H.*, Handsaker B.*, Wysoker A., Fennell T., Ruan J., Homer N., Marth G., Abecasis G., Durbin R. and 1000 Genome Project Data Processing Subgroup (2009) The Sequence alignment/map (SAM) format and SAMtools. Bioinformatics, 25, 2078-9.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)
#
loadIndex(reader,idx)
indexInitialized(reader)
#
coords<-as.integer(c(0,0,249250621))
range<-bamRange(reader,coords)
align<-getNextAlign(range)
#
bamClose(reader)

Example output

Loading required package: refGenome
Loading required package: doBy
Loading required package: RSQLite
[1] TRUE
[1] TRUE

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