Arguments
bam.file
The path of the BAM file for the sample to be counted.
granges
An object of type GRanges with the ranges in which to count reads.
min.mapq
The minimum mapping quality to count a read. Defaults to 1. Set to
0 for counting all reads.
read.width
The width of a read, used in counting overlaps of mapped reads with
the genomic ranges. The default is 1, resulting in the counting of
only read starts in genomic ranges. If the length of fixed width
reads is used, e.g. 100 for 100bp reads, then the function will
return the count of all overlapping reads with the genomic ranges.
However, counting all overlapping reads introduces dependency
between the counts in adjacent windows.
stranded.start
If true, the function will create reads of length read.width
using the strand to determine the read location. A read with + or *
strand will start at the given start position, and a read with -
strand will end at (start position + CIGAR width - 1).
get.width
If true, the function should retrieve the read width from the CIGAR
encoding rather than assign the value from read.width.
remove.dup
If true, the function will count only one read for each unique
combination of position, strand and read width.