Learn R Programming

ExomeDepth (version 1.1.15)

countBamInGRanges.exomeDepth: Compute read count data from BAM files.

Description

Parses a BAM file and count reads that are located within a target region defined by a GenomicRanges object.

Usage

countBamInGRanges.exomeDepth(
  bam.file,
  index = bam.file,
  granges,
  min.mapq = 1,
  read.width = 1
)

Arguments

bam.file

BAM file to be parsed

index

Index of the BAM file, without the '.bai' suffix.

granges

Genomic ranges object defining the bins

min.mapq

Minimum read mapping quality (Phred scaled).

read.width

For single end reads, an estimate of the frament size. For paired reads, the fragment size can be directly computed from the paired alignment and this value is ignored.

Value

A GRanges object with count data.

Details

Largely derived from its equivalent function in the exomeCopy package.