quickBamFlagSummary: Group the records of a BAM file based on their flag bits and...

Description Usage Arguments Value Author(s) References See Also Examples

Description

quickBamFlagSummary groups the records of a BAM file based on their flag bits and counts the number of records in each group.

Usage

1
2
3
4
5
6
7
8
quickBamFlagSummary(file, ..., param=ScanBamParam(), main.groups.only=FALSE)

## S4 method for signature 'character'
quickBamFlagSummary(file, index=file, ..., param=ScanBamParam(),
    main.groups.only=FALSE)

## S4 method for signature 'list'
quickBamFlagSummary(file, ..., param=ScanBamParam(), main.groups.only=FALSE)

Arguments

file, index

For the character method, the path to the BAM file to read, and to the index file of the BAM file to read, respectively.

For the list() method, file is a named list with elements “qname” and “flag” with content as from scanBam.

...

Additional arguments, perhaps used by methods.

param

An instance of ScanBamParam. This determines which records are considered in the counting.

main.groups.only

If TRUE, then the counting is performed for the main groups only.

Value

Nothing is returned. A summary of the counts is printed to the console unless redirected by sink.

Author(s)

H. Pages

References

http://samtools.sourceforge.net/

See Also

scanBam, ScanBamParam.

BamFile for a method for that class.

Examples

1
2
3
bamfile <- system.file("extdata", "ex1.bam", package="Rsamtools",
                       mustWork=TRUE)
quickBamFlagSummary(bamfile)

Rsamtools documentation built on May 20, 2017, 10:32 p.m.

Search within the Rsamtools package
Search all R packages, documentation and source code