Changes

From Genome Analysis Wiki
Jump to navigationJump to search
1,282 bytes removed ,  11:03, 6 April 2010
no edit summary
Line 22: Line 22:  
== Reading/Writing SAM/BAM Files In Your Program ==
 
== Reading/Writing SAM/BAM Files In Your Program ==
   −
Documentation on the '''SamFile''' class can be found at [[C++ Class: SamFile]]
+
Documentation on the '''SamFile''' class can be found at [[C++ Class: SamFile]].
   −
== Setting fields in a SAM/BAM Header ==
+
== SAM/BAM Header ==
The '''SamRecord''' class contains accessors to set the header lines of a SAM/BAM header.  By using these set methods to setup the header, they can be pulled back out using the get accessors or the header can be later written to a SAM/BAM file. 
+
 
The methods found in the '''SamFileHeader''' class for setting fields are:
+
Documentation on reading/writing a SAM/BAM Header can be found at [[C++ Class: SamFileHeader]].
{| class="wikitable" style="width:100%" border="1"
  −
|+ style="font-size:150%"|'''SamFileHeader Class Methods'''
  −
!  width=""|Method Name
  −
!  width=""|Description
  −
|-
  −
| bool addHeaderLine(const char* type, const char* tag, int value)
  −
| Adds the type, tag, and integer value to the header.
  −
Returns true if successfully added, false if not.
  −
NOTE: currently, this method will only do one tag per type on a line.  If a type has multiple tags, then the whole line needs to be added at once.
  −
|-
  −
| bool addHeaderLine(const char* type, const char* tag, const char* value)
  −
| Adds the type, tag, and const char* value to the header.
  −
Returns true if successfully added, false if not.
  −
NOTE: currently, this method will only do one tag per type on a line.  If a type has multiple tags, then the whole line needs to be added at once.
  −
|-
  −
| bool addHeaderLine(const char* headerLine)
  −
| Adds the already setup/formatted headerLine to the header.  It is assumed that the line does not contain a “\n”.
  −
Returns true if successfully added, false if not.
  −
|-
  −
|}
       

Navigation menu