Changes

From Genome Analysis Wiki
Jump to navigationJump to search
584 bytes removed ,  17:09, 6 April 2010
no edit summary
Line 1: Line 1:  
= SAM/BAM File=
 
= SAM/BAM File=
   −
[[C++ Library: bam Change Log]]
+
See [[C++ Library: bam Change Log]] for a list of the most recent updates to the library.
   −
== Read & Write BAM/SAM Executable ==
+
== Read & Write BAM/SAM Library ==
When the pipeline is compiled, the sam/bam executable, "bam" is generated in the pipeline/bam/ directory.
  −
 
  −
This executable takes 2 arguments.  The first argument is the input file.  The second argument is the output file.  The executable converts the first file into the format of the second file.  So if you want to convert a Bam file to a SAM file, from the pipeline/bam/ directory you just call:
  −
./bam <bamFile>.bam <newSamFile>.sam
  −
Don't forget to put in the paths to the executable and your test files.
  −
 
  −
The software reads the beginning of the 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.
      +
The software reads the beginning of files opened for reading to determine if it is SAM/BAM.  To determine the format (SAM/BAM) of files open for writing, the software checks the output file's extension.  If the extension is ".bam" it writes a BAM file, otherwise it writes a SAM file.
   −
== Read & Write BAM/SAM Library ==
+
The library is found in pipeline/bam, and is called libbam.a.
The software for reading/writing/parsing/validating SAM/BAM files is also available in library format.  The library is also found in pipeline/bam, and is called libbam.a.
      
This library is dependent on two other libraries, so be sure to include them all in the proper order:
 
This library is dependent on two other libraries, so be sure to include them all in the proper order:

Navigation menu