Changes

From Genome Analysis Wiki
Jump to navigationJump to search
1,376 bytes added ,  17:32, 14 July 2010
no edit summary
Line 85: Line 85:  
| <code>bool SamFile::SetReadSection(int32_t refID)</code>
 
| <code>bool SamFile::SetReadSection(int32_t refID)</code>
 
| Tell the class which reference ID should be read from the BAM file.  This is the index into the BAM Index list of reference information: 0 - #references.  The records for that reference id will be retrieved on each <code>ReadRecord</code> call.  When all records have been retrieved for the specified reference id, <code>ReadRecord</code> will return false until a new read section is set.
 
| Tell the class which reference ID should be read from the BAM file.  This is the index into the BAM Index list of reference information: 0 - #references.  The records for that reference id will be retrieved on each <code>ReadRecord</code> call.  When all records have been retrieved for the specified reference id, <code>ReadRecord</code> will return false until a new read section is set.
 +
Pass in -1 in order to read the section of the bam file not associated with any reference ID.
 +
 +
Returns true if the read section was successfully set, false if not.  False is returned if the BAM Index File has not yet been read or if a BAM file is not open for reading.
 +
|-
 +
| <code>bool SamFile::SetReadSection(const char* refName)</code>
 +
| Tell the class which reference name should be read from the BAM file.  The specified name will be mapped to the index into the BAM Index list of reference information: 0 - #references.  The records for that reference name will be retrieved on each <code>ReadRecord</code> call.  When all records have been retrieved for the specified reference name, <code>ReadRecord</code> will return false until a new read section is set.
 
Pass in -1 in order to read the section of the bam file not associated with any reference ID.
 
Pass in -1 in order to read the section of the bam file not associated with any reference ID.
   Line 90: Line 96:  
|-
 
|-
 
| <code>bool SamFile::SetReadSection(int32_t refID, int32_t start, int32_t end)</code>
 
| <code>bool SamFile::SetReadSection(int32_t refID, int32_t start, int32_t end)</code>
| Sets what part of the BAM file should be read.  Fails if this is not a BAM file &/or the index file has not yet been read.  This version will set it to only read a specific reference id and start/end position. The records for this section will be retrieved on each <code>ReadRecord</code> call.  When all records have been retrieved for the specified section, ReadRecord will return failure until a new read section is set.
+
| Sets what part of the BAM file should be read.  Fails if this is not a BAM file &/or the index file has not yet been read.  This version will set it to only read a specific reference id and start(inclusive)/end(exclusive) region. The records for this section will be retrieved on each <code>ReadRecord</code> call.  When all records have been retrieved for the specified section, ReadRecord will return failure until a new read section is set.
 +
 
 +
Return Value: true = success; false = failure.
 +
|-
 +
| <code>bool SamFile::SetReadSection(const char* refName, int32_t start, int32_t end)</code>
 +
| Sets what part of the BAM file should be read.  Fails if this is not a BAM file &/or the index file has not yet been read.  This version will set it to only read a specific reference name and start(inclusive)/end(exclusive) region. The records for this section will be retrieved on each <code>ReadRecord</code> call.  When all records have been retrieved for the specified section, ReadRecord will return failure until a new read section is set.
    
Return Value: true = success; false = failure.
 
Return Value: true = success; false = failure.

Navigation menu