class for tracking BAM file sequence data that covers markers of interest. More...
#include <PileupReader.h>
Public Member Functions | |
SequenceCoverageReader (SamFile &samFile) | |
void | useIndex (bool u=true) |
bool | getBases (int32_t referenceID, uint32_t position, std::vector< ReadBase > &readBases, bool &basesInserted) |
getBases returns a pileup vector of the same length as the number of reads that overlaps the given chromosome and position | |
bool | getInsertedBases (int referenceID, uint32_t position, std::vector< ReadInsertion > &readInsertions) |
class for tracking BAM file sequence data that covers markers of interest.
Given a sorted BAM file, allow us to scan over the file, either base by base or marker by marker in ascending order, and obtain a list of bases from the BAM file at the corresponding position.
In the event that an insertion is noticed after the marker of interest, signal that in getPileup, and allow the data to be returned by calling getInsertions().
Definition at line 142 of file PileupReader.h.
bool SequenceCoverageReader::getBases | ( | int32_t | referenceID, | |
uint32_t | position, | |||
std::vector< ReadBase > & | readBases, | |||
bool & | basesInserted | |||
) |
getBases returns a pileup vector of the same length as the number of reads that overlaps the given chromosome and position
referenceID | identifies the chromosome in which to retrieve bases from. | |
position | indicates the 1-based offset of the base of interest on that chromosome. This number is relative to the genome reference that the BAM file was aligned against. | |
readBases | a caller allocated vector of of readBase objects | |
basesInserted | bool that indicates if getInsertions() will return a non-zero vector of bases that were inserted AFTER this position. Since reads may truncate this insertion, they may be different lengths. |