Binary Alignment Map (BAM) is the comprehensive raw data of genome sequencing;[1] it consists of the lossless, compressed binary representation of the Sequence Alignment Map-files.
[4] The goal of indexing is to retrieve alignments that overlap a specific location quickly without having to go through all of them.
Before indexing, BAM must be sorted by reference ID and then leftmost coordinate.
The structure of BAM files include a header section and an alignment section:[6] Bam format uses 0-based coordinate system, where as SAM uses 1-based coordinate system.
[5] To view a list of sequencing and analysis tools that work with SAM/BAM click here.