From Genome Analysis Wiki
Jump to navigationJump to search
126 bytes added
, 18:31, 30 March 2010
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: |
− | {| class="wikitable" style="width:100%" border="1" | + | {| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" |
− | |+ style="font-size:150%"|'''SamFile Class Methods''' | + | |-style="background: #f2f2f2; text-align: center;" '''SamFile Class Methods''' |
− | ! width=""|Method Name | + | ! Method Name !! Description |
− | ! width=""|Description | |
| |- | | |- |
− | | bool IsEOF() | + | | <code>bool SamFile::IsEOF()</code> |
| | bool: true if the end of file has been reached, false if not. | | | bool: true if the end of file has been reached, false if not. |
| |- | | |- |
− | | bool OpenForRead(const char* filename) | + | | <code>bool SamFile::OpenForRead(const char* filename)</code> |
| | Opens the specified file for reading. | | | Opens the specified file for reading. |
| Determines if it is a BAM/SAM file by reading the beginning of the file. | | Determines if it is a BAM/SAM file by reading the beginning of the file. |
| Returns true if successfully opened reading, false if not. | | Returns true if successfully opened reading, false if not. |
| |- | | |- |
− | | bool OpenForWrite(const char * filename) | + | | <code>bool 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. |