Difference between revisions of "BamUtil"

From Genome Analysis Wiki
Jump to navigationJump to search
(Created page with '= bam Executable = The bam executable has the following functions. * Read and Validate a SAM/BAM file * Read a SAM/BAM fi…')
 
Line 8: Line 8:
  
 
== Read and Validate a SAM/BAM file ==
 
== Read and Validate a SAM/BAM file ==
 +
 +
The <code>validate</code> option on the bam executable validates a SAM/BAM file. 
 +
 +
The validation checks that the file is sorted as specified in the user options.  Default is unsorted, in which case, no order validation is done.
 +
 +
'''NOTE: Currently the only validation that is done is that the file is sorted as specified in the user specified options.'''
 +
 +
 
=== Usage ===
 
=== Usage ===
 +
 +
./bam validate --in <inputFile> [--so_flag|--so_unsorted|--so_coord|--so_query]
 +
 +
 +
=== Return Value ===
 +
*    0: all records are successfully read, are valid, and are properly sorted.
 +
* non-0: at least one record was not successfully read, not valid, or not properly sorted.
 +
 +
 +
=== Example Output ===

Revision as of 11:57, 6 April 2010

bam Executable

The bam executable has the following functions.

  • Read and Validate a SAM/BAM file
  • Read a SAM/BAM file and write the same SAM/BAM file.
  • Dump a BAM index file into an easy to read text version.
  • Read an indexed BAM file reference by reference id -1 to 22 and write it out as a SAM/BAM file.


Read and Validate a SAM/BAM file

The validate option on the bam executable validates a SAM/BAM file.

The validation checks that the file is sorted as specified in the user options. Default is unsorted, in which case, no order validation is done.

NOTE: Currently the only validation that is done is that the file is sorted as specified in the user specified options.


Usage

./bam validate --in <inputFile> [--so_flag|--so_unsorted|--so_coord|--so_query]


Return Value

  • 0: all records are successfully read, are valid, and are properly sorted.
  • non-0: at least one record was not successfully read, not valid, or not properly sorted.


Example Output