Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

testPairedEndBam

Quickly test if a BAM file has paired end reads


Description

Iterate through a BAM file until a paired-end read is encountered or the end of file is reached; report the occurrence of paired-end reads to the user.

Usage

testPairedEndBam(file, index=file, ...)

Arguments

file

character(1) BAM file name, or a BamFile instance. Open BamFiles are closed; their yield size is respected when iterating through the file.

index

(optional) character(1) name of the index file of the 'BAM' file being processed; this is given without the '.bai' extension.

...

Additional arguments, currently unused.

Value

A logical vector of length 1 containing TRUE is returned if BAM file contained paired end reads, FALSE otherwise.

Author(s)

Examples

fl <- system.file("extdata", "ex1.bam", package="Rsamtools")
testPairedEndBam(fl)

Rsamtools

Binary alignment (BAM), FASTA, variant call (BCF), and tabix file import

v2.6.0
Artistic-2.0 | file LICENSE
Authors
Martin Morgan, Hervé Pagès, Valerie Obenchain, Nathaniel Hayden
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.