From Genome Analysis Wiki
no edit summary
=== Using github ===
If you download from github or use git to keep up to date, you also need <code>libStatGen</code>. [[
http://genome.sph.umich.edu/wiki/C %2B%2B_Library: _libStatGen|Get libStatGen]].
==== Using Git To Track the Current Development Version ====
== Building ==
After obtaining the bamUtil repository (either by download or from github), compile the code using <code>make all</code>. This creates the executable, <code>bam</code>, in the bamUtil/bin/ directory.
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.
* [[C++ Executable: bam#diff|diff - Print the diffs between 2 bams]]
This executable is built using [[
Just running ./bam will print the Usage information for the bam executable.
The <code>convert</code> option on the bam executable reads a SAM/BAM file and writes it as a SAM/BAM file.
The executable converts the input file into the format of the output file. So if you want to convert a BAM file to a SAM file,
from the pipeline/bam/ directory you just call: ./bam --in <bamFile>.bam --out <newSamFile>.sam
Don't forget to put in the paths to the executable and your test files.