| BAM file format | |
|---|---|
| Filename extension |
.bam |
| Developed by |
|
| Type of format | Bioinformatics |
| Extended from | Tab-separated values |
| Website | samtools |
The BAM file format (which stands for Binary Alignment Map) is the lossless, compressed binary representation of a Sequence Alignment Map file. It is compressed by BGZF library and supports fast, random access. BAM is one of the most common file formats for raw genome sequencing data.
BAM is the compressed binary representation of SAM (Sequence Alignment Map), a compact and index-able representation of nucleotide sequence alignments. 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. BAM is in compressed BGZF format.

The structure of BAM files include a header section and an alignment section:
BAM format uses 0-based coordinate system, where as SAM uses 1-based coordinate system. BAM can represent values in the range [−2^31 , 2^32).
To view a list of sequencing and analysis tools that work with SAM/BAM click here.