Samtools is a set of utilities that manipulate nucleotide sequence alignments in the binary BAM format. It imports from and exports to the ascii SAM (Sequence Alignment/Map) format, does sorting, merging and indexing, and allows to retrieve reads in any regions swiftly. It is designed to work on a stream, and is able to open a BAM (not SAM) file on a remote FTP or HTTP server.