Skip to content

BAM File

Definition

Binary Alignment/Map format, the compressed binary version of a SAM file. Stores aligned reads with their mapping positions, quality scores, and alignment flags. samtools is the standard tool for BAM manipulation.

Full name
Binary Alignment/Map
Relation to SAM
Compressed binary version of a SAM file
Contents
Aligned reads, mapping positions, quality scores, flags
Standard tool
samtools

Common questions

Why use a BAM file instead of the SAM format it is derived from?+

SAM is a plain-text format that becomes very large for the millions of reads generated in a sequencing run, while BAM stores the same information in a compressed binary form that is far smaller on disk and faster for software to read and index, which matters for the large data volumes produced in NGS-based forensic DNA workflows.

What forensic decision does a BAM file feed into during NGS analysis?+

The alignment positions, quality scores, and flags stored in a BAM file are the input a variant or allele caller uses to determine STR repeat structures or SNP genotypes at each locus, so errors or artefacts in the underlying alignment recorded in the BAM file can propagate into an incorrect allele call if not reviewed.

Does a BAM file need to be sorted or indexed before it is usable?+

Most downstream tools, including samtools and variant callers, expect the BAM file to be coordinate-sorted and accompanied by an index file, since an unsorted or unindexed BAM cannot be efficiently queried for reads overlapping a specific genomic region such as a target STR locus.

Related terms

FASTQ
The standard sequencing output file format containing four-line records per read: identifier, nucleotide sequence, separator, and Phred quality score string. All MPS...
Isoallele
Two STR alleles that share the same repeat count (and therefore appear as the same allele on CE) but differ by a...
Phred Quality Score (Q)
A logarithmic probability score for base-call accuracy. Q30 = 99.9% accuracy (1 in 1000 error probability). Q20 = 99% accuracy. Most forensic...
Stutter (MPS)
In MPS, stutter includes both length-based stutter (as in CE, an n-1 repeat artefact from PCR slippage) and sequence-based stutter (single-nucleotide errors...
VCF
Variant Call Format, the standard output from variant callers (GATK, FreeBayes). Records each variant position with reference allele, alternative allele(s), genotype likelihoods,...

Explained in

Your journey to becoming a forensic professional starts here.

Practice with mock tests, learn from structured notes, and get your questions answered by a global forensic community, all in one place.