From Genome Analysis Wiki
Jump to: navigation, search


708 bytes added, 12:43, 21 May 2010
no edit summary
* [[C++ Executable: bam#Read and Validate a SAM/BAM file|Read and Validate a SAM/BAM file]]
* [[C++ Executable: bam#Read a SAM/BAM file and write as a SAM/BAM file|Read a SAM/BAM file and write as a SAM/BAM file]]
* [[C++ Executable: bam#Print SAM/BAM header]]
* [[C++ Executable: bam#Dump a BAM index file|Dump a BAM index file into an easy to read text version]]
* [[C++ Executable: bam#Read & Write indexed BAM file|Read an indexed BAM file reference by reference id -1 to 22 and write it out as a SAM/BAM file]]
This executable is built using the [[C++ Library: bam|bam library]].
Just running ./bam will print the Usage information for the bam executable.
./bam validate --in <inputFile> [--noeof] [--so_flag|--so_coord|--so_query] [--quitAfterErrorNum <numErrors>] [--maxReportedErrors <numReportedErrors>]
=== 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 ===
=== Usage ===
./bam <inputFile> <outputFile.sam/bam/ubam (ubam is uncompressed bam)> [NOEOF]
=== Return Value ===
Returns the SamStatus for the reads/writes.
=== Example Output ===
Number of records read = 10
Number of records written = 10
== Print SAM/BAM header==
The <code>dump_header</code> option on the bam executable prints the header of the specified SAM/BAM file to cout.
=== Parameters ===
Required Parameters:
filename : the sam/bam filename whose header should be printed.
=== Usage ===
./bam dump_header <inputFile>
=== Return Value ===
* 0: the header was successfully read and printed.
* non-0: the header was not successfully read or was not printed. (Returns the SamStatus.)
=== Example Output ===
@SQ SN:1 LN:247249719
@SQ SN:2 LN:242951149
@SQ SN:3 LN:199501827

Navigation menu