The SAM format stands for Sequence Alignment Map format. This is a TAB-delimited text based format consisting of an optional header and an alignment section. The header begins with a `@`, whilst alignments do not. Acting much like `>` in the [[FASTA format]]. The header section can be quite substantial, consisting of 2 pages (pp.3--5) in the specs (listed below). I will leave the explaining on there for now. The alignment section, consists of the following fields: ![[Pasted image 20240109143759.png]] The CIGAR section is documented here [[CIGAR format]]. The FLAG component is a bitwise flag related to the below figure. ![[Pasted image 20240109144043.png]] **Reference** [SAM format specifications](https://samtools.github.io/hts-specs/SAMv1.pdf)