Samtools is a program suite for working with high-throughput sequencing data. It handles SAM, BAM, and CRAM formats for reading, writing, indexing, and viewing alignments.
Overview
Samtools is a coordinated suite of utilities for interacting with next-generation sequencing alignments and related data. One part of a trio that also includes BCFtools for variant files and HTSlib as a shared C library; each package can be built with its own copy of HTSlib.
The samtools component focuses on mpileup and other operations on SAM, BAM, and CRAM. Published workflows cover paths from FASTQ to BAM or CRAM, whole-genome mapping through variant calling, VCF filtering, and using CRAM within the toolchain.
Source releases are available from GitHub and SourceForge. Manuals, how-tos, and format specifications document duplicate marking, reference sequences, and related topics.
BCFtools handles BCF2, VCF, and gVCF for calling and filtering short variants; HTSlib underpins both tool sets for reading and writing sequencing data.
Key features
- SAM, BAM, and CRAM read and write
- Indexing and viewing alignment files
- Mpileup and related alignment tools
- Documented FASTQ to BAM or CRAM workflows
- Variant-calling workflow documentation
- VCF filtering workflow guidance
- CRAM usage within the suite
- Coordinates with BCFtools and HTSlib
Use cases
- Manipulating aligned sequencing reads
- Converting and indexing BAM or CRAM
- Preparing data before variant analysis
- Following standard genomics file workflows