Changes

From Genome Analysis Wiki
Jump to navigationJump to search
206 bytes added ,  12:47, 3 August 2010
no edit summary
Line 93: Line 93:  
| <code>bool SamFile::SetReadSection(const char* refName)</code>
 
| <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.
 
| 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 "" or "*" in order to read the section of the bam file not associated with any reference name.
    
Must be called after <code>OpenForRead</code>.
 
Must be called after <code>OpenForRead</code>.
Line 101: Line 101:  
| <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(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.
 
| 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.
 +
Pass in -1 in order to read the section of the bam file not associated with any reference ID.
    
Must be called after <code>OpenForRead</code>.
 
Must be called after <code>OpenForRead</code>.
Line 108: Line 109:  
| <code>bool SamFile::SetReadSection(const char* refName, int32_t start, int32_t end)</code>
 
| <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.
 
| 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.
 +
Pass in "" or "*" in order to read the section of the bam file not associated with any reference name.
    
Must be called after <code>OpenForRead</code>.
 
Must be called after <code>OpenForRead</code>.

Navigation menu