This module is used for iterating over columns of alignment.
The function makePileup is called on a range of coordinate-sorted reads mapped to the same reference. It returns an input range of columns.
This returned range can then be iterated with foreach.
First column is located at the same position on the reference,
as the first base of the first read.
Each popFront operation advances current position on the reference. The default behaviour is to exclude sites with zero coverage from the iteration.
Each column keeps set of reads that overlap corresponding position on the reference. If reads contain MD tags, and makePileup was asked to use them, reference base at the column is also available.
Each read preserves all standard read properties but also keeps column-related information, namely <ul>
It is clear from the above that current CIGAR operation cannot be an insertion. The following are suggested ways to check for them: <ul>
Module for random access operations on BAM file.
BamRead type provides convenient interface for working with SAM/BAM records.
Writing a script/tool for processing BAM data often starts this way:
Each BAM file contains reads aligned to different reference sequences.
These sequences have unique identifiers in BAM file, starting from 0. Unmapped reads are associated with id = -1.
If BAI file is available, fast region queries are available, that is, getting all reads that overlap given region. This is achieved via opSlice method.
BAM records may carry arbitrary information in tags.
Value type provides convenient way to work with this information.