BamUtil

From Genome Analysis Wiki
Revision as of 13:43, 6 April 2010 by Mktrost (talk | contribs)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

bam Executable

The bam executable has the following functions.


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

Read a SAM/BAM file and write as a SAM/BAM file

Usage

./bam <inputFile> <outputFile.sam/bam>

Return Value

Example Output

Dump a BAM index file

Usage

./bam dump_index <bamIndexFile>

Return Value

  • -1 if the bam index file could not be opened.
  • 0 if the bam index file could be opened.

Example Output

Read & Write indexed BAM file

Usage

./bam read_indexed_bam <inputFilename> <outputFile.sam/bam> <bamIndexFile>

Return Value

  • 0

Example Output