Difference between revisions of "LibStatGen: BAM"

From Genome Analysis Wiki
Jump to: navigation, search
(Suggested Improvements/Features)
(BAM/SAM Classes)
 
Line 26: Line 26:
 
| 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>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamHeaderRecord.html SamHeaderRecord]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamHeaderRecord.html SamHeaderRecord]</code>
 
| Class used for storing the tag/value pairs within a given header line.
 
| Class used for storing the tag/value pairs within a given header line.
 
|-
 
|-
Line 32: Line 32:
 
| Class used for storing a SAM/BAM Record.  Allows access for getting and setting record values when both reading & writing SAM/BAM files.
 
| Class used for storing a SAM/BAM Record.  Allows access for getting and setting record values when both reading & writing SAM/BAM files.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamStatus.html SamStatus]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamStatus.html SamStatus]</code>
 
| Status value used by the BAM classes for returning the status of the operations.
 
| Status value used by the BAM classes for returning the status of the operations.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamValidator.html SamValidator]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamValidator.html SamValidator]</code>
 
| Validates a SAM/BAM Record.
 
| Validates a SAM/BAM Record.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamValidationError.html SamValidationError]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamValidationError.html SamValidationError]</code>
 
| Validation Error Information for a SamRecord.
 
| Validation Error Information for a SamRecord.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamValidationErrors.html SamValidationErrors]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamValidationErrors.html SamValidationErrors]</code>
 
| Container for ValidationErrors.
 
| Container for ValidationErrors.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classPileup.html Pileup]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classPileup.html Pileup]</code>
 
| Template for doing pileups.
 
| Template for doing pileups.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classPileupElement.html PileupElement]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classPileupElement.html PileupElement]</code>
 
| Base class that can be used for the elements stored in a Pileup.
 
| Base class that can be used for the elements stored in a Pileup.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classErrorHandler.html ErrorHandler]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classErrorHandler.html ErrorHandler]</code>
 
| Class for handling errors based on the error handling type.
 
| Class for handling errors based on the error handling type.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classPosList.html PosList]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classPosList.html PosList]</code>
 
| Store refID/position, but does not store values < 0.
 
| Store refID/position, but does not store values < 0.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamFilter.html SamFilter]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamFilter.html SamFilter]</code>
 
| Class for filtering a SAM/BAM record.
 
| Class for filtering a SAM/BAM record.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamFlag.html SamFlag]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamFlag.html SamFlag]</code>
 
| Class for getting information from a SAM/BAM flag.
 
| Class for getting information from a SAM/BAM flag.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamReferenceInfo.html SamReferenceInfo]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamReferenceInfo.html SamReferenceInfo]</code>
 
| Class for tracking the reference information mapping between the reference ids and the reference names.
 
| Class for tracking the reference information mapping between the reference ids and the reference names.
 
|-
 
|-
| <code>[http://www.sph.umich.edu/csg/mktrost/doxygen/current/classSamTags.html SamTags]</code>
+
| <code>[http://csg.sph.umich.edu//mktrost/doxygen/current/classSamTags.html SamTags]</code>
 
| Class for parsing/creating/operating on SAM/BAM record tags.
 
| Class for parsing/creating/operating on SAM/BAM record tags.
 
|}
 
|}

Latest revision as of 10:55, 2 February 2017


SAM/BAM File

See the github history: https://github.com/statgen/libStatGen/commits/master/bam for a list of the most recent updates to the BAM classes.

Old BAM Review Action Items

Read & Write BAM/SAM Library Software

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 statgen/lib/bam.

BAM/SAM Classes

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.
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 BAM classes for returning the status of the operations.
SamValidator Validates a SAM/BAM Record.
SamValidationError Validation Error Information for a SamRecord.
SamValidationErrors Container for ValidationErrors.
Pileup Template for doing pileups.
PileupElement Base class that can be used for the elements stored in a Pileup.
ErrorHandler Class for handling errors based on the error handling type.
PosList Store refID/position, but does not store values < 0.
SamFilter Class for filtering a SAM/BAM record.
SamFlag Class for getting information from a SAM/BAM flag.
SamReferenceInfo Class for tracking the reference information mapping between the reference ids and the reference names.
SamTags Class for parsing/creating/operating on SAM/BAM record tags.

FAQs

SAM/BAM Classes FAQs

Usage Examples

Sam Library Usage Examples


Programs

BamUtil contains a set of programs that uses this library to operate on SAM & BAM files. It includes tools for converting between SAM & BAM and validating the files. See BamUtil for more information and a description of all the tools.