Introduction
SAM (Sequence Alignment/Map) is a text format for DNA sequencing reads and their alignment to a reference sequence. samtools reads it and converts it to the related BAM and CRAM formats.
Structure
Header lines begin with @. Each other line is one tab-delimited alignment
with eleven mandatory fields: query name, flags, reference name, position, mapping
quality, CIGAR string, mate reference name, mate position, template length, sequence and
base qualities. Optional fields follow in the form TAG:TYPE:VALUE.
Not described
This page is a first outline.
Known, not yet covered
- Reference: the header record types, flag bits, CIGAR operations and optional tags of the SAM specification.
- Viewer: the site has no viewer for this format.
Also used for
- Raw PCM audio – Bare audio samples with no header: the format must be known in advance.
Links
Software
- samtools – tools that view, convert, sort and index SAM, BAM and CRAM
Reference
- Sequence Alignment/Map format specification – the SAM and BAM specification
- sam(5) – HTSlib’s manual page on the format