From Genome Analysis Wiki
→What is SAM: refer to BamFile c++ library code
Most often it is generated as a human readable version of its sister [[BAM]] format, which stores the same data in a compressed, indexed, binary form.
Currently, most SAM format data is output from aligners that read FASTQ files and assign the sequences to a position with respect to a genome. In the future, SAM will also be used to archive unaligned sequence data generated directly from sequencing machines.
The current definition of the format is at [[http://samtools.sourceforge.net/SAM1.pdf BAM/SAM Specification]].
== What Information is in SAM & BAM ==