19 :
public std::binary_function<std::pair<char, unsigned>, unsigned, void>
22 operator()(
const std::pair<char, unsigned> &p,
const unsigned &u)
const 24 std::cout << p.first <<
" (" << double(p.second) / double(u) <<
") ";
42 cout <<
"Base composition for sequence " << x.name <<
"\n";
44 if (count.ndna ==
false)
47 = x.length() - count.gap
52 = (count.a > 0) ?
double(count.a) / double(len) : 0.;
54 = (count.g > 0) ?
double(count.g) / double(len) : 0.;
56 = (count.c > 0) ?
double(count.c) / double(len) : 0.;
58 = (count.t > 0) ?
double(count.t) / double(len) : 0.;
61 std::cout <<
"using Sequence::stateCounter: " 62 <<
"A (" << percA <<
") " 63 <<
"G (" << percG <<
") " 64 <<
"C (" << percC <<
") " 65 <<
"T (" << percT <<
")\n";
69 cout <<
"non-DNA character encountered. Skipping...\n";
72 std::map<char, unsigned> m
74 std::cout <<
"using Sequence::makeCountList(): ";
75 std::for_each(m.begin(), m.end(),
77 std::cout << std::endl;
bool operator()(const std::pair< key, value > &l, const std::pair< key, value > &r) const
keep track of state counts at a site in an alignment or along a sequence
The namespace in which this library resides.
Declaration of Sequence::makeCountList (an alternative to Sequence::stateCounter), Sequence::internalGapCheck.
Declaration of Sequence::Fasta streams.
declaration of Sequence::stateCounter, a class to keep track of nucleotide counts either at a site in...
std::map< typename std::iterator_traits< Iterator >::value_type, unsigned > makeCountList(Iterator beg, Iterator end)