Parses a BAM file and count reads that are located within a target region defined by a GenomicRanges object.
countBamInGRanges.exomeDepth(
bam.file,
index = bam.file,
granges,
min.mapq = 1,
read.width = 1
)
BAM file to be parsed
Index of the BAM file, without the '.bai' suffix.
Genomic ranges object defining the bins
Minimum read mapping quality (Phred scaled).
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.
A GRanges object with count data.
Largely derived from its equivalent function in the exomeCopy package.