BAM (Binary Alignment Map)

BAM (Binary Alignment Map) is a data format used for mapping sequences of DNA. It is a compressed binary version of the data in the SAM format. It is classified as an alignment format, as is CRAM. This is as opposed to sequence-only, unaligned, formats such as FASTA and FASTQ.

BAM is compressed as a series of compressed blocks, each one a gzip archive. This is known as BGZF compression.

An index of a BAM is stored in a format called BAI, also described in the spec.

Specifications

 * SAM/BAM specification
 * Optional fields (tags) specification

Links

 * Wikipedia article
 * HTS-Specs Github
 * samtools-devel mailing list