From Genome Analysis Wiki
Reorganize the tools
The bam executable has the following functions.
[[BamUtil: validate|validate|validate - Read and Validate a SAM/BAM file]]* [[BamUtil: convert|convert - Read a SAM/BAM file and write as a SAM/BAM file (optionally converts between '=' & bases in the sequence)]]* [[BamUtil: dumpHeader|dumpHeader - Print SAM/BAM header]]* [[BamUtil: splitChromosome|splitChromosome - Split BAM by Chromosome]]* [[BamUtil: writeRegion|writeRegion - Write the alignments in the indexed BAM file that fall into the specified region]]* [[BamUtil: dumpRefInfo| dumpRefInfo - Print SAM/BAM Reference Information]]* [[BamUtil: dumpIndex| dumpIndex - Dump a BAM index file into an easy to read text version]]* [[BamUtil: readIndexedBam|readIndexedBam - Read an indexed BAM file reference by reference id -1 to the max reference id and write it out as a SAM/BAM file]] * [[BamUtil: filter| filter - Filter reads by clipping ends with too high of a mismatch percentage and by marking reads unmapped if the quality of mismatches is too high]]* [[BamUtil: readReference| readReference - Print the reference string for the specified region]]* [[BamUtil: diff| diff - Print the diffs between 2 bams]] * [[BamUtil: stats| stats - Print the diffs between 2 bams]]* [[BamUtil: revert| revert - Revert SAM/BAM replacing the specified fields with their previous values (if known).]]* [[BamUtil: squeeze| squeeze - reduces files size by dropping OQ fields, duplicates, specified tags, using '=' when a base matches the reference, binning quality scores.]]* [[BamUtil: findCigars| findCigars - Output just the reads that contain any of the specified CIGAR operations.]]
This executable is built using [[C++ Library: libStatGen]].
Just running ./bam will print the Usage information for the bam executable.