Difference between revisions of "Template:BamUtilPrograms"

From Genome Analysis Wiki
Jump to navigationJump to search
(Created page with " The following tools are part of the BamUtil program which is built using libStatGen. Running <code>bin/bam</code> with no parameters ...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
The following tools are part of the [[BamUtil|BamUtil program]] which is built using [[C++ Library: libStatGen|libStatGen]].
+
[[BamUtil]] is built using [[C++ Library: libStatGen|libStatGen]]. Running <code>bin/bam</code> with no parameters will print the usage information for the <code>bam</code> executable.  Running <code>bin/bam ''subProgram''</code> will print the usage information for the BamUtil sub-program.
 
 
Running <code>bin/bam</code> with no parameters will print the Usage information for the <code>bam</code> executable.  Running <code>bin/bam ''subProgram''</code> will print the usage information for the BamUtil sub-program.
 
 
 
  
 
'''Tools to Rewrite SAM/BAM Files: '''
 
'''Tools to Rewrite SAM/BAM Files: '''
Line 12: Line 9:
 
* [[BamUtil: findCigars|findCigars]] - Output just the reads that contain any of the specified CIGAR operations.
 
* [[BamUtil: findCigars|findCigars]] - Output just the reads that contain any of the specified CIGAR operations.
 
* [[BamUtil: convert#BAM File Recovery | BAM Recovery]] - Recover corrupted BAM files
 
* [[BamUtil: convert#BAM File Recovery | BAM Recovery]] - Recover corrupted BAM files
 
  
 
'''Tools to Modify & write SAM/BAM Files: '''
 
'''Tools to Modify & write SAM/BAM Files: '''
Line 19: Line 15:
 
* [[BamUtil: revert|revert]] - Revert SAM/BAM replacing the specified fields with their previous values (if known) and removes specified tags
 
* [[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: 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 the ends of reads in a SAM/BAM file changing read ends to 'N' and quality to '!'
+
* [[BamUtil: trimBam|trimBam]] - Trim the ends of reads in a SAM/BAM file changing read ends to 'N' and quality to '!' or by doing soft clips
 
* [[BamUtil: mergeBam|mergeBam]] - Merge multiple BAMs and headers appending ReadGroupIDs if necessary
 
* [[BamUtil: mergeBam|mergeBam]] - Merge multiple BAMs and headers appending ReadGroupIDs if necessary
 
* [[BamUtil: polishBam|polishBam]] - Add/update header lines & add the RG tag to each record
 
* [[BamUtil: polishBam|polishBam]] - Add/update header lines & add the RG tag to each record
 
* [[BamUtil: dedup|dedup]] - Mark or remove duplicates, can also perform recalibration
 
* [[BamUtil: dedup|dedup]] - Mark or remove duplicates, can also perform recalibration
 
* [[BamUtil: recab|recab]] - Recalibrate base qualities
 
* [[BamUtil: recab|recab]] - Recalibrate base qualities
 
  
 
'''Informational Tools:'''
 
'''Informational Tools:'''
Line 32: Line 27:
 
* [[BamUtil: gapInfo|gapInfo]] - Print information on the gap between read pairs in a SAM/BAM File.
 
* [[BamUtil: gapInfo|gapInfo]] - Print information on the gap between read pairs in a SAM/BAM File.
  
 
+
'''Helper Tools to Print Information In Readable Format:'''
''Helper Tools to Print Information In Readable Format:'''
 
 
* [[BamUtil: dumpHeader|dumpHeader]] - Print the SAM/BAM Header to the screen
 
* [[BamUtil: dumpHeader|dumpHeader]] - Print the SAM/BAM Header to the screen
 
* [[BamUtil: dumpRefInfo|dumpRefInfo]] - Print SAM/BAM Reference Name Information from the header
 
* [[BamUtil: dumpRefInfo|dumpRefInfo]] - Print SAM/BAM Reference Name Information from the header
Line 39: Line 33:
 
* [[BamUtil: readReference|readReference]] - Print the reference string for the specified region to the screen
 
* [[BamUtil: readReference|readReference]] - Print the reference string for the specified region to the screen
 
* [[BamUtil: explainFlags|explainFlags]] - Describe SAM/BAM flags
 
* [[BamUtil: explainFlags|explainFlags]] - Describe SAM/BAM flags
 
  
 
'''Additional Tools:'''
 
'''Additional Tools:'''
 
* [[BamUtil: bam2FastQ|bam2FastQ]] - Convert the specified BAM file to fastQs.
 
* [[BamUtil: bam2FastQ|bam2FastQ]] - Convert the specified BAM file to fastQs.
 
  
 
'''Dummy/Example Tools:'''
 
'''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
 
* [[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
 
  
 
'''ASP programs: <span style="color:#D2691E">ASP is a new format that is currently in production, so this tool is not yet available for public release.</span>'''
 
'''ASP programs: <span style="color:#D2691E">ASP is a new format that is currently in production, so this tool is not yet available for public release.</span>'''
 
* [[BamUtil: asp | asp]] - perform an asynchronous pileup producing an ASP file.
 
* [[BamUtil: asp | asp]] - perform an asynchronous pileup producing an ASP file.
 
* [[BamUtil: dumpAsp|dumpAsp]] - perform an asynchronous pileup producing an ASP file.
 
* [[BamUtil: dumpAsp|dumpAsp]] - perform an asynchronous pileup producing an ASP file.

Latest revision as of 11:02, 9 March 2015

BamUtil is built using libStatGen. Running bin/bam with no parameters will print the usage information for the bam executable. Running bin/bam subProgram will print the usage information for the BamUtil sub-program.

Tools to Rewrite SAM/BAM Files:

  • convert - Convert SAM/BAM to SAM/BAM (optionally converts between '=' & bases in the sequence
  • writeRegion - Write a file with reads in the specified region and/or have the specified read name
  • splitChromosome - Split BAM into 1 file per Chromosome
  • splitBam - Split BAM into 1 file per Read Group
  • findCigars - Output just the reads that contain any of the specified CIGAR operations.
  • BAM Recovery - Recover corrupted BAM files

Tools to Modify & write SAM/BAM Files:

  • clipOverlap - Clip overlapping read pairs in a SAM/BAM File already sorted by Coordinate or ReadName so they do not overlap
  • filter - Filter reads by soft 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 - 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
  • trimBam - Trim the ends of reads in a SAM/BAM file changing read ends to 'N' and quality to '!' or by doing soft clips
  • mergeBam - Merge multiple BAMs and headers appending ReadGroupIDs if necessary
  • polishBam - Add/update header lines & add the RG tag to each record
  • dedup - Mark or remove duplicates, can also perform recalibration
  • recab - Recalibrate base qualities

Informational Tools:

  • validate - Validate a SAM/BAM File, checking file format & printing statistics
  • diff - Diff 2 coordinate sorted SAM/BAM files.
  • stats - Generate some basic statistics for a SAM/BAM file
  • gapInfo - Print information on the gap between read pairs in a SAM/BAM File.

Helper Tools to Print Information In Readable Format:

  • dumpHeader - Print the SAM/BAM Header to the screen
  • dumpRefInfo - Print SAM/BAM Reference Name Information from the header
  • dumpIndex - Print BAM Index File to the screen in a readable format
  • readReference - Print the reference string for the specified region to the screen
  • explainFlags - Describe SAM/BAM flags

Additional Tools:

  • bam2FastQ - Convert the specified BAM file to fastQs.

Dummy/Example Tools:

  • 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

ASP programs: ASP is a new format that is currently in production, so this tool is not yet available for public release.

  • asp - perform an asynchronous pileup producing an ASP file.
  • dumpAsp - perform an asynchronous pileup producing an ASP file.