Description Usage Arguments Details Value Author(s) References See Also Examples
Function to create AlignedGenomeIntervals
objects from BAM
(binary alignment map format) files. Uses functions from package
Rsamtools
to parse BAM files.
1 | agiFromBam(bamfile, ...)
|
bamfile |
File path of BAM file. BAM file should be sorted and have an index in the same directory (see Details below). |
... |
further arguments passed on to function |
Note: the BAM files must be sorted and must also have an index
file (*.bai
) in the same directory. These should be done when
creating the BAM. However, the functions sortBam
and
indexBam
can be used for the same purpose, as can the
respective modules of the “samtools” library (‘samtools
sort’ and ‘samtools index’).
The BAM files are parsed chromosome by chromosome to limit the memory
footprint of the function. Thus, this function aims to be a
less-memory-consuming alternative to first reading in the BAM file
using the readAligned
function and then converting the
AlignedRead
object into an AlignedGenomeIntervals
object.
An object of class AlignedGenomeIntervals
.
J Toedling
http://samtools.sourceforge.net
scanBam
,
AlignedGenomeIntervals-class
1 2 3 | fl <- system.file("extdata", "ex1.bam", package="Rsamtools")
ExGi <- agiFromBam(fl)
head(detail(ExGi))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.