A BAM (binary alignment map) file (.bam) is the binary version of a SAM (sequence alignment map) file (.sam). A SAM file is a tab-delimited text file that contains sequence alignment data. A BAM file contains aligned reads sorted by reference location.