.bam — Binary Alignment Map
SAMtools and BCFtools development team · 2009
BAM is a compressed binary file format used to store large DNA sequencing alignment data for genomic analysis.
Key Features
- Compressed binary representation of SAM
- Efficient storage and faster I/O
- Supports random access for targeted analysis
- Widely adopted standard in bioinformatics
Best For
- Storing and sharing large volumes of genomic alignment data
- Enabling rapid querying and analysis of specific genomic regions
- Reducing storage requirements compared to SAM files
Less Ideal For
- Storing raw DNA sequencing reads before alignment
- Human-readable text-based descriptions of alignments
- General-purpose data storage outside of bioinformatics
Common Use Cases
- Storing results from DNA sequencing experiments
- Analyzing gene expression levels
- Identifying genetic mutations and variations
- Mapping short reads to a reference genome
How to Open It
- Use specialized bioinformatics software like IGV (Integrative Genomics Viewer) or Tablet.
- Open BAM files within command-line tools such as SAMtools, which is designed for manipulating these files.
- Load BAM files into web-based genome browsers like the UCSC Genome Browser or Ensembl.
- Utilize programming libraries in R (e.g., Rsamtools) or Python (e.g., pysam) for programmatic access.
What is a .bam file?
The Binary Alignment Map (BAM) format is a crucial component in modern genomics and bioinformatics. It serves as a compressed, binary version of the Sequence Alignment Map (SAM) format, making it significantly smaller and more efficient for storage and processing. BAM files store sequence alignment data, which details how short DNA sequences, generated by sequencing machines, map to a reference genome. This format is essential for analyzing genetic variations, gene expression, and other complex genomic data, forming the backbone of many research pipelines.
Programs That Open .bam Files
| Platform | Program | ||
|---|---|---|---|
| Windows | IGV (Integrative Genomics Viewer) | Free | |
| macOS | IGV (Integrative Genomics Viewer) | Free | |
| Linux | SAMtools | Free | Official |
| Web Browser | UCSC Genome Browser | Free |
How to Convert .bam Files
| Format | Method |
|---|---|
| .SAM | SAMtools, IGV |
| .WIG | SAMtools (bedgraph), custom scripts |
Common Problems with .bam Files
Frequently Asked Questions
BAM is significantly smaller and faster to process due to its compressed binary nature, making it ideal for large genomic datasets.
No, BAM files are binary and cannot be directly edited with standard text editors. You need specialized bioinformatics software or command-line tools.
BAM files store sequence alignment data, detailing how DNA sequencing reads map to a reference genome.
Technical Details
BAM is a binary encoding of the SAM format, designed for efficient storage and random access. It utilizes the BGZF (Blocked GNU Zip Format) compression algorithm, which allows for both compression and the ability to seek to specific regions within the file. Each record within a BAM file represents a single DNA sequence read and its alignment details against a reference.