The "Binary Alignment Map" (BAM) format is one of the common binary formats used to store sequence alignment information. Questions should include this tag if they directly pertain to the format itself, details of BAM file usage, or errors relating to likely malformed BAM files.

BAM was the first widely-adopted binary standard for storing NGS alignments. Its specification is openly maintained here. BAM is a compressed format, using bgzf to compress reads in blocks. This is convenient, as it allows sorted files to be indexed and then rapid queried.

Questions with this tag should broadly fall into one of the following categories:

  1. Questions regarding the standard itself (e.g., "What is the relationship between the BAM header and alignments?").
  2. Questions regarding using BAM files (e.g., "How do I sort a BAM file?" or "How do I ensure that all reads in one/more fastq files are contained in a BAM file?).
  3. When seeing errors, such as corrupt or incomplete BAM files.

Particularly for category 3, it is then vital to provide information regarding exactly how the BAM file was made, ideally including the version of upstream tools as well as the exact command used.