Changes

From Genome Analysis Wiki
Jump to navigationJump to search
462 bytes added ,  18:12, 18 April 2012
Line 118: Line 118:  
     bool setReadSection(const char* chromName);
 
     bool setReadSection(const char* chromName);
 
     bool set1BasedReadSection(const char* chromName,  
 
     bool set1BasedReadSection(const char* chromName,  
                               int32_t start, int32_t end);
+
                               int32_t start, int32_t end,
 +
                              bool overlap = false);
 
</source>
 
</source>
 
Both methods currently always return true, since in the current implementation this can't fail.  It currently allows the VcfIndex file to be read after this call.
 
Both methods currently always return true, since in the current implementation this can't fail.  It currently allows the VcfIndex file to be read after this call.
Line 127: Line 128:     
<code>set1BasedReadSection</code> will set the code to read the specified chromosome starting at the specified 1-based position up to, but not including, the specified 1-based end position.  On the first <code>readRecord</code> call it will jump the file to the beginning of this section.  It will continue to read the section for each <code>readRecord</code> call made until it has read the entire section.  Once the entire section has been read, <code>readRecord</code> will return false until a new read section is specified.  
 
<code>set1BasedReadSection</code> will set the code to read the specified chromosome starting at the specified 1-based position up to, but not including, the specified 1-based end position.  On the first <code>readRecord</code> call it will jump the file to the beginning of this section.  It will continue to read the section for each <code>readRecord</code> call made until it has read the entire section.  Once the entire section has been read, <code>readRecord</code> will return false until a new read section is specified.  
 +
 +
<code>set1BasedReadSection</code> takes an optional parameter, <code>overlap</code>.  It is defaulted to false which means that only records that start within the specified region will be returned by <code>readRecord</code>.  If <code>overlap</code> is set to true, <code>readRecord</code> will also return records that start prior to the specified region, but whose deletions occur in the specified region.
    
Implementation NOTE: internally it may read extra records prior to the section, but <code>readRecord</code> will keep reading and will not return until it finds a record in the section or until the section has been passed (no records in the section).
 
Implementation NOTE: internally it may read extra records prior to the section, but <code>readRecord</code> will keep reading and will not return until it finds a record in the section or until the section has been passed (no records in the section).

Navigation menu