Changes

From Genome Analysis Wiki
Jump to navigationJump to search
2,951 bytes removed ,  14:23, 3 January 2014
Line 191: Line 191:  
The software reads the beginning of an input file to determine if it is SAM/BAM.  To determine the format (SAM/BAM) of the output file, the software checks the output file's extension.  If the extension is ".bam" it writes a BAM file, otherwise it writes a SAM file.
 
The software reads the beginning of an input file to determine if it is SAM/BAM.  To determine the format (SAM/BAM) of the output file, the software checks the output file's extension.  If the extension is ".bam" it writes a BAM file, otherwise it writes a SAM file.
   −
The bam executable has the following functions.
+
{{BamUtilPrograms}}
 
  −
 
  −
* Rewrite SAM/BAM Files
  −
** [[BamUtil: convert|'''convert''' - Read a SAM/BAM file and write as a SAM/BAM file (optionally converts between '=' & bases in the sequence)]]
  −
** [[BamUtil: writeRegion|'''writeRegion''' - Write the alignments in the indexed BAM file that fall into the specified region and/or have the specified read name]]
  −
** [[BamUtil: splitChromosome|'''splitChromosome''' - Split BAM by Chromosome]]
  −
** [[BamUtil: splitBam|'''splitBam''' - Split SAM/BAM file by Read Group]]
  −
** [[BamUtil: findCigars|'''findCigars''' - Output just the reads that contain any of the specified CIGAR operations]]
  −
 
  −
* Modify & write SAM/BAM Files
  −
** [[BamUtil: clipOverlap|'''clipOverlap''' - Clip overlapping read pairs so they do not overlap]]
  −
** [[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: revert|'''revert''' - Revert SAM/BAM replacing the specified fields with their previous values (if known) and removes specified tags]]
  −
** [[BamUtil: squeeze|'''squeeze''' -  Reduce file size by dropping OQ fields, duplicates, specified tags, using '=' when a base matches the reference, binning quality scores, and replacing readNames with unique integers]]
  −
** [[BamUtil: trimBam|'''trimBam''' - Trim end of reads, changing read ends to ‘N’ & quality to ‘!’]]
  −
**[[BamUtil: polishBam|'''polishBam''' – Add/Update header lines & add RG tag to each record]]
  −
**[[BamUtil: rgMergeBam|'''rgMergeBam''' – Merge sorted BAM files adding Read Groups]]
  −
**[[BamUtil: dedup|'''dedup''' – Mark or remove duplicates, can also perform recalibration]]
  −
**[[BamUtil: recab|'''recab''' - Recalibrate base qualities]]
  −
 
  −
* Informational Tools
  −
** [[BamUtil: validate|'''validate''' - Read and Validate a SAM/BAM file]]
  −
** [[BamUtil: diff|'''diff''' - Print the diffs between 2 bams]]
  −
** [[BamUtil: stats|'''stats''' - Print some basic statistics on a SAM/BAM file]]
  −
** [[BamUtil: gapInfo|'''gapInfo''' - Print information on the gap between read pairs in a SAM/BAM file]]
  −
 
  −
* Print Information in Readable Form:
  −
** [[BamUtil: dumpHeader|'''dumpHeader''' - Print SAM/BAM header]]
  −
** [[BamUtil: dumpRefInfo|'''dumpRefInfo''' - Print SAM/BAM Reference Information]]
  −
** [[BamUtil: dumpIndex|'''dumpIndex''' - Dump a BAM index file into an easy to read text version]]
  −
** [[BamUtil: readReference|'''readReference''' - Print the reference string for the specified region]]
  −
 
  −
*Additional Tools
  −
** [[BamUtil: bam2FastQ|'''bam2FastQ''' - Convert the specified BAM file to fastQs]]
  −
 
  −
* Dummy/Example Tools:
  −
** [[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]]
  −
 
  −
This executable is built using [[C++ Library: libStatGen]].
  −
 
  −
Just running ./bam will print the Usage information for the bam executable.
 

Navigation menu