Sequence::stateCounter Class Reference
[Function objects defined in the library]

keep track of state counts at a site in an alignment or along a sequence More...

#include <Sequence/stateCounter.hpp>

List of all members.

Public Member Functions

 stateCounter (const char &gapchar= '-')
void operator() (const char &ch) const
unsigned nStates (void) const

Public Attributes

unsigned a
unsigned g
unsigned c
unsigned t
unsigned zero
unsigned one
unsigned gap
unsigned n
bool ndna

Detailed Description

keep track of state counts at a site in an alignment or along a sequence

Warning:
class data are public. Use responsibly.
Examples:

baseComp.cc.

Definition at line 39 of file stateCounter.hpp.


Constructor & Destructor Documentation

Sequence::stateCounter::stateCounter ( const char &  gapchar = '-'  ) 
Parameters:
gapchar charcter representing a gap in an alignment

Definition at line 57 of file stateCounter.cc.


Member Function Documentation

unsigned Sequence::stateCounter::nStates ( void   )  const
Returns:
the number of states counted, excluding gaps and missing data

Definition at line 106 of file stateCounter.cc.

void Sequence::stateCounter::operator() ( const char &  ch  )  const
Parameters:
ch the character in position i,j in an alignment

Definition at line 64 of file stateCounter.cc.


Member Data Documentation

unsigned Sequence::stateCounter::a [mutable]

the number of times the character 'a' or 'A' has been counted

Examples:
baseComp.cc.

Definition at line 44 of file stateCounter.hpp.

unsigned Sequence::stateCounter::c [mutable]

the number of times the character 'c' or 'C' has been counted

Examples:
baseComp.cc.

Definition at line 44 of file stateCounter.hpp.

unsigned Sequence::stateCounter::g [mutable]

the number of times the character 'g' or 'G' has been counted

Examples:
baseComp.cc.

Definition at line 44 of file stateCounter.hpp.

unsigned Sequence::stateCounter::gap [mutable]

the number of times the gap character has been counted

Examples:
baseComp.cc.

Definition at line 44 of file stateCounter.hpp.

unsigned Sequence::stateCounter::n [mutable]

the number of times the missing data character 'N' has been counted

Examples:
baseComp.cc.

Definition at line 44 of file stateCounter.hpp.

true if a non-DNA character has been encountered, false otherwise

Examples:
baseComp.cc.

Definition at line 45 of file stateCounter.hpp.

unsigned Sequence::stateCounter::one [mutable]

the number of times the character '1' has been counted

Definition at line 44 of file stateCounter.hpp.

unsigned Sequence::stateCounter::t [mutable]

the number of times the character 't' or 'T' has been counted

Examples:
baseComp.cc.

Definition at line 44 of file stateCounter.hpp.

unsigned Sequence::stateCounter::zero [mutable]

the number of times the character '0' has been counted

Definition at line 44 of file stateCounter.hpp.


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

Generated on Mon Jul 12 15:22:05 2010 for libsequence by  doxygen 1.6.1