summarizeAlignment: Summarize alignment results

Description Usage Arguments Details Value Author(s) Examples

View source: R/summarizeAlignment.R

Description

This function summarized the results from an alignment by reading through the corresponding BAM file and counting the number of uniquely aligned or multi-mapped reads.

Usage

1
summarizeAlignment( x, index=character(), sbp=ScanBamParam( what=c( "flag", "mapq" ), tag=c( "NH", "HI" ) ), yieldSize=1e+6, v=FALSE )

Arguments

x

The file name of the BAM file to summarize.

index

The file name of the index file for the BAM (usually the BAM filename with suffix ".bai").

sbp

The ScanBamParam specifying which fields to read.

yieldSize

The number of entries that should be sequentially processed.

v

verbosity.

Details

This function scans throught the full BAM file and records the number of uniquely or multi-aligned reads along with their mapping quality.

Value

A list with 3 elements:

Author(s)

Johannes Rainer

Examples

1
2
3
4
5
dirpath <- system.file( package="SeqUtils", "extdata" )
bamfile <- dir( dirpath, "example.bam", full=TRUE )

Res <- summarizeAlignment( bamfile )
Res$counts

jotsetung/SeqUtils documentation built on May 19, 2019, 9:41 p.m.