StochHMM  v0.34
Flexible Hidden Markov Model C++ Library and Application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes
StochHMM::Counter Class Reference

#include <Counter.h>

List of all members.

Public Member Functions

 Counter ()
 Counter (int, int, int, int, int)
 Counter (int, int, int, int)
 Counter (int, int, int)
 Counter (int)
 Counter (sequence &, countType, track *, int, int, int, int, int)
 Counter (track *, int, int, int, int, int)
 Counter (track *, int, int, int, int)
 Counter (track *, int, int, int)
 Counter (track *, int)
 Counter (std::vector< sequence * > &, countType, track *, int, int, int, int, int)
 Counter (sequenceStream &, countType, track *, int, int, int, int, int)
bool countGeneral (sequence &, int, int)
bool countGeneral (std::vector< sequence * > &, int, int)
bool countGeneral (sequenceStream &, int, int)
bool countPeriodic (sequence &, int, int)
bool countPeriodic (std::vector< sequence * > &, int, int)
bool countPeriodic (sequenceStream &, int, int)
bool countPWM (sequence &, int, int)
bool countPWM (std::vector< sequence * > &, int, int)
bool countPWM (sequenceStream &, int, int)
bool countMask (sequence &, int, int)
bool countMask (std::vector< sequence * > &, int, int)
bool _count (sequence &, std::vector< lexicalTable * > &)
 Working copy of countGeneral.
void clear ()
void printTable ()
void setOrder (size_t)
void setPeriod (size_t)
void setPseudoCount (size_t)
void setTrack (track *)

Private Member Functions

void initializeTable (size_t)
 Creates x number of lexical tables and appends them to the vector of lexical tables.

Private Attributes

int sequencesCounted
 Total number of sequences counted.
int lengthOfAllSequences
 Bp of all sequences counted.
countType type
trackseqtrk
 The track defined for our sequence(s)
int seqLength
size_t period
size_t order
size_t pseudoCount
bool variableSet
int upstream
 The number of bp upstream to ignore.
int downstream
 The number of bp downstream to ignore.
std::vector< lexicalTable * > tables

Detailed Description

Definition at line 47 of file Counter.h.


Constructor & Destructor Documentation

StochHMM::Counter::Counter ( )

Definition at line 29 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, type, upstream, and variableSet.

StochHMM::Counter::Counter ( int  per,
int  up,
int  down,
int  ord,
int  pseud 
)

Definition at line 39 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, type, upstream, and variableSet.

{
period=per;
downstream=down;
order=ord;
pseudoCount=pseud;
variableSet=false;
}
StochHMM::Counter::Counter ( int  per,
int  up,
int  down,
int  ord 
)

Definition at line 50 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, type, upstream, and variableSet.

{
period=per;
downstream=down;
order=ord;
variableSet=false;
}
StochHMM::Counter::Counter ( int  per,
int  up,
int  down 
)

Definition at line 61 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, type, upstream, and variableSet.

{
period=per;
downstream=down;
order=0;
variableSet=false;
}
StochHMM::Counter::Counter ( int  per)

Definition at line 72 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, type, upstream, and variableSet.

{
period=per;
order=0;
variableSet=false;
}
StochHMM::Counter::Counter ( sequence seq,
countType  typ,
track trk,
int  per,
int  up,
int  down,
int  ord,
int  pseud 
)

Definition at line 82 of file Counter.cpp.

References countGeneral(), countMask(), countPeriodic(), countPWM(), downstream, StochHMM::GENERAL, StochHMM::MASK, StochHMM::NONE, order, period, StochHMM::PERIODIC, pseudoCount, seqtrk, upstream, and variableSet.

{
period = per;
upstream = up;
downstream = down;
order = ord;
pseudoCount = pseud;
seqtrk = trk;
variableSet = false;
if (typ == GENERAL) {
countGeneral(seq, up, down);
}
else if (typ == PERIODIC) {
countPeriodic(seq, up, down);
}
else if (typ == PWM) {
countPWM(seq, up, down);
}
else if (typ == MASK) {
countMask(seq, up, down);
}
else if (typ == NONE) {
std::cerr << "Need to define count type" << std::endl;
exit(1);
}
}
StochHMM::Counter::Counter ( track trk,
int  per,
int  up,
int  down,
int  ord,
int  pseud 
)

Definition at line 111 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, seqtrk, type, upstream, and variableSet.

{
seqtrk = trk;
period=per;
downstream=down;
order=ord;
pseudoCount=pseud;
variableSet=false;
}
StochHMM::Counter::Counter ( track trk,
int  per,
int  up,
int  down,
int  ord 
)

Definition at line 123 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, seqtrk, type, upstream, and variableSet.

{
seqtrk = trk;
period=per;
downstream=down;
order=ord;
variableSet=false;
}
StochHMM::Counter::Counter ( track trk,
int  per,
int  up,
int  down 
)

Definition at line 135 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, seqtrk, type, upstream, and variableSet.

{
seqtrk = trk;
period=per;
downstream=down;
order=0;
variableSet=false;
}
StochHMM::Counter::Counter ( track trk,
int  per 
)

Definition at line 147 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, seqtrk, type, upstream, and variableSet.

{
seqtrk = trk;
period=per;
order=0;
variableSet=false;
}
StochHMM::Counter::Counter ( std::vector< sequence * > &  seqs,
countType  typ,
track trk,
int  per,
int  up,
int  down,
int  ord,
int  pseud 
)

Definition at line 159 of file Counter.cpp.

References countGeneral(), countMask(), countPeriodic(), countPWM(), downstream, StochHMM::GENERAL, StochHMM::MASK, StochHMM::NONE, order, period, StochHMM::PERIODIC, pseudoCount, seqtrk, upstream, and variableSet.

{
period = per;
upstream = up;
downstream = down;
order = ord;
pseudoCount = pseud;
seqtrk = trk;
variableSet = false;
if (typ == GENERAL) {
countGeneral(seqs, up, down);
}
else if (typ == PERIODIC) {
countPeriodic(seqs, up, down);
}
else if (typ == PWM) {
countPWM(seqs, up, down);
}
else if (typ == MASK) {
countMask(seqs, up, down);
}
else if (typ == NONE) {
std::cerr << "Need to define count type" << std::endl;
exit(1);
}
}
StochHMM::Counter::Counter ( sequenceStream seq,
countType  typ,
track trk,
int  per,
int  up,
int  down,
int  ord,
int  pseud 
)

Definition at line 188 of file Counter.cpp.

References countGeneral(), countMask(), countPeriodic(), countPWM(), downstream, StochHMM::GENERAL, StochHMM::MASK, StochHMM::NONE, order, period, StochHMM::PERIODIC, pseudoCount, seqtrk, upstream, and variableSet.

{
period = per;
upstream = up;
downstream = down;
order = ord;
pseudoCount = pseud;
seqtrk = trk;
variableSet = false;
if (typ == GENERAL) {
countGeneral(seq, up, down);
}
else if (typ == PERIODIC) {
countPeriodic(seq, up, down);
}
else if (typ == PWM) {
countPWM(seq, up, down);
}
else if (typ == MASK) {
countMask(seq, up, down);
}
else if (typ == NONE) {
std::cerr << "Need to define count type" << std::endl;
exit(1);
}
}

Member Function Documentation

bool StochHMM::Counter::_count ( sequence seq,
std::vector< lexicalTable * > &  tbl 
)

Working copy of countGeneral.

Definition at line 218 of file Counter.cpp.

References downstream, StochHMM::sequence::get_index(), StochHMM::sequence::getLength(), StochHMM::sequence::getMask(), lengthOfAllSequences, StochHMM::MASK, order, period, sequencesCounted, type, and upstream.

Referenced by countGeneral(), countMask(), countPeriodic(), and countPWM().

{
bool counted = false;
int seqln = seq.getLength();
for(int i=upstream; i<=seqln-downstream-1;i++){
int per;
if (type == MASK) {
per = seq.getMask(i) - 1;
}
else {
per = (i-upstream)%period;
}
std::pair<Index,Index> word_index;
seq.get_index(i, order, word_index);
int letters = word_index.first.size();
int words = word_index.second.size();
if (letters!=1 && words!=1){
double val = 1.0f / static_cast<double> (letters * words);
//increment all the applicable cells of the table by the value 'val'
for (int i=0; i<words; i++) {
for (int j=0; j<letters; j++) {
(tbl[per])->incrementCountsDouble(word_index.second[i], word_index.first[j], val);
}
}
counted = true;
}
else{
//increment the lexical table (letters,words)
for (int i=0; i<words; i++) {
for (int j=0; j<letters; j++) {
(tbl[per])->incrementCounts(word_index.second[i], word_index.first[j]);
}
}
counted = true;
}
}
return counted;
}
void StochHMM::Counter::clear ( )

Definition at line 652 of file Counter.cpp.

References downstream, StochHMM::NONE, order, period, pseudoCount, tables, type, upstream, and variableSet.

{
for(int i=0; i<tables.size(); i++) {
delete tables[i];
}
order=0;
period=0;
variableSet=false;
}
bool StochHMM::Counter::countGeneral ( sequence seq,
int  up,
int  down 
)

Definition at line 265 of file Counter.cpp.

References _count(), downstream, StochHMM::GENERAL, StochHMM::sequence::getLength(), initializeTable(), period, tables, type, upstream, and variableSet.

Referenced by Counter(), and countGeneral().

{
if (variableSet == true) {
if (up != upstream) {
std::cerr << "Upstream: " << up << " is not initialized value: " << upstream << std::endl;
exit(1);
}
else if (down != downstream) {
std::cerr << "Downstream: " << down << " is not initialized value: " << downstream << std::endl;
exit(1);
}
}
else if (variableSet == false) {
int seqln = seq.getLength();
if (period != 1) {
std::cout << "Period set to 1 for count general (was " << period << ")" << std::endl;
}
period = 1;
//check if upstream is positive, not too small (smaller than order),
// and not too large (larger than seqLength)
if (up < 0 || up < order || up > (seqln-1) ) {
std::cerr << "Upstream must be non-negative, equal to or larger than the order, and smaller than the sequence length -1" << std::endl;
exit(1);
}
//check if downstream is positive, and not too large (seqLength-downstream > upstream)
if (down < 0 || (seqln-down-1) < up) {
std::cerr << "Downstream must be non-negative, and at least as far in the sequence as upstream" << std::endl;
exit(1);
}
upstream = up;
downstream = down;
variableSet = true;
}
bool counted;
std::vector<lexicalTable*>& tbl=tables;
counted = _count(seq,tbl);
return counted;
}
bool StochHMM::Counter::countGeneral ( std::vector< sequence * > &  seqs,
int  up,
int  down 
)

Definition at line 314 of file Counter.cpp.

References countGeneral().

{
bool counted = true;
for (size_t i=0; i<seqs.size(); i++) {
if (countGeneral(*(seqs[i]), up, down) == false) {
counted = false;
}
}
return counted;
}
bool StochHMM::Counter::countGeneral ( sequenceStream seq,
int  up,
int  down 
)

Definition at line 324 of file Counter.cpp.

References _count(), downstream, StochHMM::GENERAL, StochHMM::sequence::getLength(), initializeTable(), period, tables, type, upstream, and variableSet.

{
if (variableSet == true) {
if (up != upstream) {
std::cerr << "Upstream: " << up << " is not initialized value: " << upstream << std::endl;
exit(1);
}
else if (down != downstream) {
std::cerr << "Downstream: " << down << " is not initialized value: " << downstream << std::endl;
exit(1);
}
}
else if (variableSet == false) {
int seqln = seq.getLength();
if (period != 1) {
std::cout << "Period set to 1 for count general (was " << period << ")" << std::endl;
}
period = 1;
//check if upstream is positive, not too small (smaller than order),
// and not too large (larger than seqLength)
if (up < 0 || up < order || up > (seqln-1) ) {
std::cerr << "Upstream must be non-negative, equal to or larger than the order, and smaller than the sequence length -1" << std::endl;
exit(1);
}
//check if downstream is positive, and not too large (seqLength-downstream > upstream)
if (down < 0 || (seqln-down-1) < up) {
std::cerr << "Downstream must be non-negative, and at least as far in the sequence as upstream" << std::endl;
exit(1);
}
upstream = up;
downstream = down;
variableSet = true;
}
bool counted;
std::vector<lexicalTable*>& tbl=tables;
counted = _count(seq,tbl);
return counted;
}
bool StochHMM::Counter::countMask ( sequence seq,
int  up,
int  down 
)

Definition at line 573 of file Counter.cpp.

References _count(), downstream, StochHMM::sequence::getLength(), StochHMM::sequence::getMaxMask(), initializeTable(), StochHMM::MASK, period, tables, type, upstream, and variableSet.

Referenced by Counter(), and countMask().

{
if (variableSet == true) {
if (up != upstream) {
std::cerr << "Upstream: " << up << " is not initialized value: " << upstream << std::endl;
exit(1);
}
else if (down != downstream) {
std::cerr << "Downstream: " << down << " is not initialized value: " << downstream << std::endl;
exit(1);
}
}
else if (variableSet == false) {
int seqln = seq.getLength();
if (up < 0 || up < order || up > (seqln-1) ) {
std::cerr << "Upstream must be non-negative, equal to or larger than the order, and smaller than the sequence length -1" << std::endl;
exit(1);
}
if (down < 0 || (seqln-down-1) < up) {
std::cerr << "Downstream must be non-negative, and at least as far in the sequence as upstream" << std::endl;
exit(1);
}
upstream = up;
downstream = down;
variableSet = true;
}
int max_mask_size = seq.getMaxMask();
size_t num_tables = tables.size();
if (max_mask_size > num_tables){
initializeTable(max_mask_size-num_tables);
}
bool counted;
std::vector<lexicalTable*>& tbl=tables;
counted = _count(seq,tbl);
return counted;
}
bool StochHMM::Counter::countMask ( std::vector< sequence * > &  seqs,
int  up,
int  down 
)

Definition at line 623 of file Counter.cpp.

References countMask().

{
bool counted = true;
for (size_t i=0; i<seqs.size(); i++) {
//std::cout << seqs[i]->stringify() << std::endl;
if (countMask(*(seqs[i]), up, down) == false) {
counted = false;
}
}
return counted;
}
bool StochHMM::Counter::countPeriodic ( sequence seq,
int  up,
int  down 
)

Definition at line 476 of file Counter.cpp.

References _count(), downstream, StochHMM::sequence::getLength(), initializeTable(), period, StochHMM::PERIODIC, tables, type, upstream, and variableSet.

Referenced by Counter(), and countPeriodic().

{
if (variableSet == true) {
if (up != upstream) {
std::cerr << "Upstream: " << up << " is not initialized value: " << upstream << std::endl;
exit(1);
}
else if (down != downstream) {
std::cerr << "Downstream: " << down << " is not initialized value: " << downstream << std::endl;
exit(1);
}
}
else if (variableSet == false) {
int seqln = seq.getLength();
if (up < 0 || up < order || up > (seqln-1) ) {
std::cerr << "Upstream must be non-negative, equal to or larger than the order, and smaller than the sequence length -1" << std::endl;
exit(1);
}
if (down < 0 || (seqln-down-1) < up) {
std::cerr << "Downstream must be non-negative, and at least as far in the sequence as upstream" << std::endl;
exit(1);
}
upstream = up;
downstream = down;
variableSet = true;
}
bool counted;
std::vector<lexicalTable*>& tbl=tables;
counted = _count(seq,tbl);
return counted;
}
bool StochHMM::Counter::countPeriodic ( std::vector< sequence * > &  seqs,
int  up,
int  down 
)

Definition at line 519 of file Counter.cpp.

References countPeriodic().

{
bool counted = true;
for (size_t i=0; i<seqs.size(); i++) {
if (countPeriodic(*(seqs[i]), up, down) == false) {
counted = false;
}
}
return counted;
}
bool StochHMM::Counter::countPeriodic ( sequenceStream seq,
int  up,
int  down 
)

Definition at line 529 of file Counter.cpp.

References _count(), downstream, StochHMM::sequence::getLength(), initializeTable(), period, StochHMM::PERIODIC, tables, type, upstream, and variableSet.

{
if (variableSet == true) {
if (up != upstream) {
std::cerr << "Upstream: " << up << " is not initialized value: " << upstream << std::endl;
exit(1);
}
else if (down != downstream) {
std::cerr << "Downstream: " << down << " is not initialized value: " << downstream << std::endl;
exit(1);
}
}
else if (variableSet == false) {
int seqln = seq.getLength();
if (up < 0 || up < order || up > (seqln-1) ) {
std::cerr << "Upstream must be non-negative, equal to or larger than the order, and smaller than the sequence length -1" << std::endl;
exit(1);
}
if (down < 0 || (seqln-down-1) < up) {
std::cerr << "Downstream must be non-negative, and at least as far in the sequence as upstream" << std::endl;
exit(1);
}
upstream = up;
downstream = down;
variableSet = true;
}
bool counted;
std::vector<lexicalTable*>& tbl=tables;
counted = _count(seq,tbl);
return counted;
}
bool StochHMM::Counter::countPWM ( sequence seq,
int  up,
int  down 
)

Definition at line 372 of file Counter.cpp.

References _count(), downstream, StochHMM::sequence::getLength(), initializeTable(), period, StochHMM::PWM, seqLength, tables, type, upstream, and variableSet.

Referenced by Counter(), and countPWM().

{
int seqln = seq.getLength();
if (variableSet == true) {
if (up != upstream) {
std::cerr << "Upstream: " << up << " is not initialized value: " << upstream << std::endl;
exit(1);
}
else if (down != downstream) {
std::cerr << "Downstream: " << down << " is not initialized value: " << downstream << std::endl;
exit(1);
}
else if (seqln != seqLength) {
std::cerr << "Seqlength: " << seqln << " is not initialized value: " << seqLength << std::endl;
exit(1);
}
}
//Setup variables on first call
else if (variableSet == false) {
type = PWM;
seqLength = seqln;
if (up < 0 || up < order || up > (seqln-1) ) {
std::cerr << "Upstream must be non-negative, equal to or larger than the order, and smaller than the sequence length -1" << std::endl;
exit(1);
}
if (down < 0 || (seqln-down-1) < up) {
std::cerr << "Downstream must be non-negative, and at least as far in the sequence as upstream" << std::endl;
exit(1);
}
upstream = up;
downstream = down;
variableSet = true;
}
bool counted;
std::vector<lexicalTable*>& tbl=tables;
counted = _count(seq,tbl);
return counted;
}
bool StochHMM::Counter::countPWM ( std::vector< sequence * > &  seqs,
int  up,
int  down 
)

Definition at line 419 of file Counter.cpp.

References countPWM().

{
bool counted = true;
for (size_t i=0; i<seqs.size(); i++) {
if (countPWM(*(seqs[i]), up, down) == false) {
counted = false;
}
}
return counted;
}
bool StochHMM::Counter::countPWM ( sequenceStream seq,
int  up,
int  down 
)

Definition at line 429 of file Counter.cpp.

References _count(), downstream, StochHMM::sequence::getLength(), initializeTable(), period, StochHMM::PWM, seqLength, tables, type, upstream, and variableSet.

{
int seqln = seq.getLength();
if (variableSet == true) {
if (up != upstream) {
std::cerr << "Upstream: " << up << " is not initialized value: " << upstream << std::endl;
exit(1);
}
else if (down != downstream) {
std::cerr << "Downstream: " << down << " is not initialized value: " << downstream << std::endl;
exit(1);
}
else if (seqln != seqLength) {
std::cerr << "Seqlength: " << seqln << " is not initialized value: " << seqLength << std::endl;
exit(1);
}
}
//Setup variables on first call
else if (variableSet == false) {
type = PWM;
seqLength = seqln;
if (up < 0 || up < order || up > (seqln-1) ) {
std::cerr << "Upstream must be non-negative, equal to or larger than the order, and smaller than the sequence length -1" << std::endl;
exit(1);
}
if (down < 0 || (seqln-down-1) < up) {
std::cerr << "Downstream must be non-negative, and at least as far in the sequence as upstream" << std::endl;
exit(1);
}
upstream = up;
downstream = down;
variableSet = true;
}
bool counted;
std::vector<lexicalTable*>& tbl=tables;
counted = _count(seq,tbl);
return counted;
}
void StochHMM::Counter::initializeTable ( size_t  table_count)
private

Creates x number of lexical tables and appends them to the vector of lexical tables.

Definition at line 634 of file Counter.cpp.

References StochHMM::lexicalTable::addTrack(), StochHMM::COUNTS, StochHMM::lexicalTable::createTable(), StochHMM::track::getAlphaSize(), order, pseudoCount, seqtrk, and tables.

Referenced by countGeneral(), countMask(), countPeriodic(), and countPWM().

{
size_t cols = seqtrk->getAlphaSize();
size_t rows = integerPower<size_t>(cols,order);
//size_t cols = pow(rows,order);
for (int i = 0; i < table_count; i++) {
lexicalTable *table = new lexicalTable();
table->createTable(rows, cols, pseudoCount, COUNTS);
//std::cout << order << std::endl;
table->addTrack(seqtrk, order);
//table->print();
//exit(0);
tables.push_back(table);
}
return;
}
void StochHMM::Counter::printTable ( )

Definition at line 665 of file Counter.cpp.

References downstream, lengthOfAllSequences, order, sequencesCounted, tables, and upstream.

{
std::cout << "Number of sequences counted: " << sequencesCounted << std::endl;
std::cout << "Number of bp counted: " << lengthOfAllSequences << std::endl;
std::cout << "Upstream/downstream settings: " << upstream << "/" << downstream << std::endl;
std::cout << "Order: " << order << std::endl;
for(int i=0; i < tables.size(); i++) {
tables[i]->print();
}
}
void StochHMM::Counter::setOrder ( size_t  ord)

Definition at line 677 of file Counter.cpp.

References order, and variableSet.

{
if (variableSet == false) {
order = ord;
}
else {
std::cerr << "Already started counting, order was set to " << order << ". Must use clear() to set order again." << std::endl;
exit(1);
}
}
void StochHMM::Counter::setPeriod ( size_t  per)

Definition at line 687 of file Counter.cpp.

References period, and variableSet.

{
if (variableSet == false) {
period = per;
}
else {
std::cerr << "Already started counting, period was set to " << period << ". Must use clear() to set period again." << std::endl;
exit(1);
}
}
void StochHMM::Counter::setPseudoCount ( size_t  pseud)

Definition at line 697 of file Counter.cpp.

References pseudoCount, and variableSet.

{
if (variableSet == false) {
pseudoCount = pseud;
}
else {
std::cerr << "Already started counting, pseudocount was set to " << pseudoCount <<
". Must use clear() to set pseudocount again." << std::endl;
exit(1);
}
}
void StochHMM::Counter::setTrack ( track trk)

Definition at line 708 of file Counter.cpp.

References seqtrk, and variableSet.

{
if (variableSet== false) {
seqtrk = trk;
}
else {
std::cerr << "Track is already set for counting. Must use clear() to set again." << std::endl;
}
}

Member Data Documentation

int StochHMM::Counter::downstream
private

The number of bp downstream to ignore.

Definition at line 127 of file Counter.h.

Referenced by _count(), clear(), Counter(), countGeneral(), countMask(), countPeriodic(), countPWM(), and printTable().

int StochHMM::Counter::lengthOfAllSequences
private

Bp of all sequences counted.

Definition at line 100 of file Counter.h.

Referenced by _count(), and printTable().

size_t StochHMM::Counter::order
private

Definition at line 115 of file Counter.h.

Referenced by _count(), clear(), Counter(), initializeTable(), printTable(), and setOrder().

size_t StochHMM::Counter::period
private

Definition at line 114 of file Counter.h.

Referenced by _count(), clear(), Counter(), countGeneral(), countMask(), countPeriodic(), countPWM(), and setPeriod().

size_t StochHMM::Counter::pseudoCount
private

Definition at line 116 of file Counter.h.

Referenced by clear(), Counter(), initializeTable(), and setPseudoCount().

int StochHMM::Counter::seqLength
private

Used only in countPWM; stores the length of the first input sequence *for making sure each sequence being counted is the same length

Definition at line 112 of file Counter.h.

Referenced by countPWM().

track* StochHMM::Counter::seqtrk
private

The track defined for our sequence(s)

Definition at line 105 of file Counter.h.

Referenced by Counter(), initializeTable(), and setTrack().

int StochHMM::Counter::sequencesCounted
private

Total number of sequences counted.

Definition at line 97 of file Counter.h.

Referenced by _count(), and printTable().

std::vector<lexicalTable*> StochHMM::Counter::tables
private
countType StochHMM::Counter::type
private

Definition at line 102 of file Counter.h.

Referenced by _count(), clear(), Counter(), countGeneral(), countMask(), countPeriodic(), and countPWM().

int StochHMM::Counter::upstream
private

The number of bp upstream to ignore.

Definition at line 124 of file Counter.h.

Referenced by _count(), clear(), Counter(), countGeneral(), countMask(), countPeriodic(), countPWM(), and printTable().

bool StochHMM::Counter::variableSet
private

Indicates whether or not the variables are set *When true, counting has begun, changing the variables would result in an error; must use clear() first to change *When false, counting has not yet begun, variables can be changed

Definition at line 121 of file Counter.h.

Referenced by clear(), Counter(), countGeneral(), countMask(), countPeriodic(), countPWM(), setOrder(), setPeriod(), setPseudoCount(), and setTrack().


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