Changes

From Genome Analysis Wiki
Jump to navigationJump to search
565 bytes added ,  11:25, 30 June 2010
no edit summary
Line 86: Line 86:  
| 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.
 
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.
 
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(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.
 +
 +
Return Value: true = success; false = failure.
 
|}
 
|}
  

Navigation menu