21 void printRefPositions(std::string inFile, std::string indexFile,
22 std::string rname,
int startPosition,
33 samIn.SetReadSection(rname.c_str(), startPosition, endPosition);
37 while(samIn.ReadRecord(header, record))
40 std::cout <<
"Read " << samIn.GetCurrentRecordCount() <<
":";
48 std::cout <<
" " << refPos;
int32_t getRefPosition(int32_t queryIndex, int32_t queryStartPos)
Return the reference position associated with the specified query index or INDEX_NA based on this cig...
Cigar * getCigarInfo()
Returns a pointer to the Cigar object associated with this record.
static const int32_t INDEX_NA
Value associated with an index that is not applicable/does not exist, used for converting between que...
int32_t getReadLength()
Get the length of the read.
This class represents the CIGAR without any methods to set the cigar (see CigarRoller for that)...
int32_t get1BasedPosition()
Get the 1-based(SAM) leftmost position (POS) of the record.
Allows the user to easily read/write a SAM/BAM file.
Class providing an easy to use interface to get/set/operate on the fields in a SAM/BAM record...
bool ReadBamIndex(const char *filename)
Read the specified bam index file.