Difference between revisions of "LibStatGen: BAM"

From Genome Analysis Wiki
Jump to navigationJump to search
Line 22: Line 22:
 
| <code>[[C++ Class: SamFileHeader|SamFileHeader]]</code>
 
| <code>[[C++ Class: SamFileHeader|SamFileHeader]]</code>
 
| Class used for storing the header.  Allows access for getting and setting header values when both reading & writing SAM/BAM files.
 
| Class used for storing the header.  Allows access for getting and setting header values when both reading & writing SAM/BAM files.
 +
|-
 +
| <code>[[[C++ Class: SamHeaderRecord|SamHeaderRecord]]</code>
 +
| Class used for storing the tag/value pairs within a given header line.
 
|-
 
|-
 
| <code>[[C++ Class: SamRecord|SamRecord]]</code>
 
| <code>[[C++ Class: SamRecord|SamRecord]]</code>

Revision as of 19:26, 20 April 2010

SAM/BAM File

See C++ Library: libbam Change Log for a list of the most recent updates to the library.

Read & Write BAM/SAM Library

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.

The library is 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:

<path to base pipeline directory>/libbam.a <path to base pipeline directory>/libcsg/libcsg.a <path to base pipeline directory>/thirdParty/samtools/libbam.a

Classes in the BAM/SAM Library

Class Name Description
SamFile Class used for reading/writing SAM/BAM files and their headers and records.
SamFileHeader Class used for storing the header. Allows access for getting and setting header values when both reading & writing SAM/BAM files.
[[[C++ Class: SamHeaderRecord|SamHeaderRecord]] Class used for storing the tag/value pairs within a given header line.
SamRecord Class used for storing a SAM/BAM Record. Allows access for getting and setting record values when both reading & writing SAM/BAM files.
SamStatus Status value used by the libbam classes for returning the status of the operations.


Suggested Improvements/Features