19#include "BaseComposition.h"
35 bool validIndex =
true;
39 if(rawSequenceCharIndex == 0)
47 while(rawSequenceCharIndex >= myBaseCountVector.size())
51 myBaseCountVector.push_back(baseCountEntry);
62 myBaseCountVector[rawSequenceCharIndex].incrementCount(baseIndex);
72 std::cout << std::endl <<
"Base Composition Statistics:" << std::endl;
73 std::cout.precision(2);
76 std::cout << std::fixed <<
"Read Index"
77 <<
"\t%A" <<
"\t%C" <<
"\t%G" <<
"\t%T" <<
"\t%N" <<
"\tTotal Reads At Index"
79 for(
unsigned int i = 0; i < myBaseCountVector.size(); i++)
81 std::cout << std::setw(10) << i <<
" ";
82 myBaseCountVector[i].printPercent();
84 std::cout << std::endl;
91 myBaseCountVector.clear();
void resetPrimerCount()
Reset the number of primers to 0.
int getBaseIndex(const char &letter)
Returns the baseIndex value for the character passed in.
bool updateComposition(unsigned int rawSequenceCharIndex, char baseChar)
Update the composition for the specified index with the specified character.
void clear()
Clear the composition stored in the base count vector.
BaseComposition()
Constructor.
void print()
Print the composition.
This class is a wrapper around an array that has one index per base and an extra index for a total co...