BamUtils
From BITS wiki
Suite of command-line tools for manipulating SAM files.
Usage: bam <tool> [<tool arguments>] Just enter 'bam <tool>' to see its usage instructions. E.g. 'bam filter'.
Contents
Rewrite SAM/BAM Files
- convert - Convert SAM/BAM to SAM/BAM
- writeRegion - Write a file with reads in the specified region and/or have the specified read name
- splitChromosome - Split BAM by Chromosome
- splitBam - Split a BAM file into multiple BAM files based on ReadGroup
- findCigars - Output just the reads that contain any of the specified CIGAR operations.
Modify & write SAM/BAM Files
- clipOverlap - Clip overlapping read pairs in a SAM/BAM File already sorted by Coordinate or ReadName
- 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
- revert - Revert SAM/BAM replacing the specified fields with their previous values (if known) and removes specified tags
- squeeze - reduces files size by dropping OQ fields, duplicates, & specified tags, using '=' when a base matches the reference, binning quality scores, and replacing readNames with unique integers
- trimBam - Trim the ends of reads in a SAM/BAM file changing read ends to 'N' and quality to '!'
- rgMergeBam - merge multiple BAMs and headers appending ReadGroupIDs
- polishBam - adds/updates header lines & adds the RG tag to each record
- dedup - Mark Duplicates
- recab - Recalibrate
Checking and comparing SAM/BAM files
- validate - Validate a SAM/BAM File
- diff - Diff 2 coordinate sorted SAM/BAM files.
- stats - Stats a SAM/BAM File
- gapInfo - Print information on the gap between read pairs in a SAM/BAM File.
Information in readable format
- dumpHeader - Print SAM/BAM Header
- dumpRefInfo - Print SAM/BAM Reference Name Information
- dumpIndex - Print BAM Index File in English
- readReference - Print the reference string for the specified region
Additional Tools
- bam2FastQ - Convert the specified BAM file to fastQs.
Dummy/Example Tools
- readReference - Print the reference string for the specified region