Changes

From Genome Analysis Wiki
Jump to navigationJump to search
130 bytes added ,  18:35, 30 March 2010
no edit summary
Line 4: Line 4:  
The '''SamFile''' class allows a user to easily read/write a SAM/BAM file.
 
The '''SamFile''' class allows a user to easily read/write a SAM/BAM file.
 
The methods found in this class are:
 
The methods found in this class are:
{| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"
+
{| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1"
 
|-style="background: #f2f2f2; text-align: center;"  '''SamFile Class Methods'''
 
|-style="background: #f2f2f2; text-align: center;"  '''SamFile Class Methods'''
 
! Method Name !!  Description
 
! Method Name !!  Description
Line 16: Line 16:  
Returns true if successfully opened reading, false if not.
 
Returns true if successfully opened reading, false if not.
 
|-
 
|-
| <code>bool OpenForWrite(const char * filename)</code>
+
| <code>bool SamFile::OpenForWrite(const char * filename)</code>
 
| bool: true if successfully opened, false if not.
 
| bool: true if successfully opened, false if not.
 
Opens as BAM file if the specified filename ends in .bam.  Otherwise it is opened as a SAM file.
 
Opens as BAM file if the specified filename ends in .bam.  Otherwise it is opened as a SAM file.
 
Returns true if successfully opened for writing, false if not.
 
Returns true if successfully opened for writing, false if not.
 
|-
 
|-
| void Close()
+
| <code>void SamFile::Close()</code>
 
| Close the file if there is one open.
 
| Close the file if there is one open.
 
|-
 
|-
| bool ReadHeader(SamFileHeader& header)
+
| <code>bool SamFile::ReadHeader(SamFileHeader& header)</code>
 
| Reads the header section from the file and stores it in the passed in header.
 
| Reads the header section from the file and stores it in the passed in header.
 
Returns true if successfully read, false if not.
 
Returns true if successfully read, false if not.
 
|-  
 
|-  
| bool WriteHeader(const SamFileHeader& header)
+
| <code>bool SamFile::WriteHeader(const SamFileHeader& header)</code>
 
| Writes the specified header into the file.
 
| Writes the specified header into the file.
 
Returns true if successfully written, false if not.
 
Returns true if successfully written, false if not.
 
|-   
 
|-   
| bool ReadRecord(SamFileHeader& header, SamRecord& record)
+
| <code>bool SamFile::ReadRecord(SamFileHeader& header, SamRecord& record)</code>
 
| Reads the next record from the file and stores it in the passed in record.
 
| Reads the next record from the file and stores it in the passed in record.
 
Returns true if successfully read, false if not.
 
Returns true if successfully read, false if not.
 
|-  
 
|-  
| bool WriteRecord(SamFileHeader& header, SamRecord& record)
+
| <code>bool SamFile::WriteRecord(SamFileHeader& header, SamRecord& record)</code>
 
| Writes the specified record into the file.
 
| Writes the specified record into the file.
 
Returns true if successfully written, false if not.
 
Returns true if successfully written, false if not.

Navigation menu