From Genome Analysis Wiki
Jump to navigationJump to search
687 bytes added
, 11:27, 6 April 2010
Line 33: |
Line 33: |
| | <code>bool SamFile::ReadRecord(SamFileHeader& header, SamRecord& record)</code> | | | <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. | + | Validates that the record is sorted according to the value set by <code>setSortedValidation</code>. No sorting validation is done if specified to be unsorted, or <code>setSortedValidation</code> was never called. |
| + | |
| + | Returns false if the record was not successfully read or not properly sorted. Returns true if successfully read and properly sorted. |
| |- | | |- |
| | <code>bool SamFile::WriteRecord(SamFileHeader& header, SamRecord& record)</code> | | | <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. | + | Validates that the record is sorted according to the value set by <code>setSortedValidation</code>. No sorting validation is done if specified to be unsorted, or <code>setSortedValidation</code> was never called. Returns false and does not write the record if the record was not properly sorted. |
| + | |
| + | Returns false if the record was not properly sorted or not successfully written. Returns true if properly sorted and successfully written. |
| |- | | |- |
| | <code>void setSortedValidation(SortedType sortType)<\code> | | | <code>void setSortedValidation(SortedType sortType)<\code> |