libStatGen Software 1
Loading...
Searching...
No Matches
TestPileup Class Reference
Inheritance diagram for TestPileup:
Collaboration diagram for TestPileup:

Public Member Functions

void testPileupPosition ()
Public Member Functions inherited from Pileup< TestPileupElement >
 Pileup (const defaultPileup< TestPileupElement > &fp=defaultPileup< TestPileupElement >())
 Constructor using the default maximum number of bases a read spans.
virtual ~Pileup ()
 Destructor.
virtual int processFile (const std::string &fileName, uint16_t excludeFlag=0x0704, uint16_t includeFlag=0)
 Performs a pileup on the specified file.
virtual void processAlignment (SamRecord &record)
 Add an alignment to the pileup.
virtual void processAlignmentRegion (SamRecord &record, int startPos, int endPos, PosList *excludeList=NULL)
 Add only positions that fall within the specified region of the alignment to the pileup and outside of the specified excluded positions.
void flushPileup ()
 Done processing, flush every position that is currently being stored in the pileup.

Additional Inherited Members

Protected Member Functions inherited from Pileup< TestPileupElement >
void addAlignmentPosition (int refPosition, SamRecord &record)
int pileupPosition (int refPosition)
virtual void resetElement (TestPileupElement &element, int position)
virtual void addElement (TestPileupElement &element, SamRecord &record)
virtual void analyzeElement (TestPileupElement &element)
virtual void analyzeHead ()
Protected Attributes inherited from Pileup< TestPileupElement >
defaultPileup< TestPileupElementmyAnalyzeFuncPtr
std::vector< TestPileupElementmyElements
int pileupStart
int pileupHead
int pileupTail
int pileupWindow
int myCurrentRefID
GenomeSequencemyRefPtr

Detailed Description

Definition at line 32 of file TestPileup.h.

Member Function Documentation

◆ testPileupPosition()

void TestPileup::testPileupPosition ( )

Definition at line 32 of file TestPileup.cpp.

33{
34 assert(pileupPosition(14000) == 0);
35 assert(pileupHead == 14000);
36 assert(pileupStart == 14000);
37 assert(pileupTail == 14000);
38
39 bool caught = false;
40 try
41 {
42 pileupPosition(13999);
43 }
44 catch(std::exception& e)
45 {
46 caught = true;
47 assert(strcmp(e.what(), "Overflow on the pileup buffer: specifiedPosition = 13999, pileup buffer start position: 14000, pileup buffer end position: 15024") == 0);
48 }
49 assert(caught);
50
51 caught = false;
52 try
53 {
54 pileupPosition(15025);
55 }
56 catch(std::exception& e)
57 {
58 caught = true;
59 assert(strcmp(e.what(), "Overflow on the pileup buffer: specifiedPosition = 15025, pileup buffer start position: 14000, pileup buffer end position: 15024") == 0);
60 }
61 assert(caught);
62}

The documentation for this class was generated from the following files: