42 typedef std::pair< std::string, int > CodonFreq;
46 static const unsigned int alphsize = 4;
47 static const char alphabet[alphsize] ={
'A',
'C',
'G',
'T'};
51 std::string::const_iterator end )
54 for (
unsigned i = 0 ; i < alphsize ; ++i)
55 for (
unsigned j = 0 ; j < alphsize ; ++j)
56 for (
unsigned k = 0 ; k < alphsize ; ++k)
62 std::string::const_iterator::difference_type pos = 0;
64 for( ; (beg+pos) < end ; pos += 3 )
73 UsageTable.push_back( CodonFreq(codon,count) );
88 return doWork(sequence->
begin(),sequence->
end());
98 return doWork(sequence.begin(),sequence.end());
102 std::string::const_iterator end)
112 return doWork(beg,end);
class Sequence::Seq, an abstract base class for Sequences
Abstract interface to sequence objects.
The namespace in which this library resides.
std::vector< std::pair< std::string, int > > CodonUsageTable
facility to count codons in CDS sequence, function Sequence::makeCodonUsageTable
bool Different(const std::string &seq1, const std::string &seq2, const bool &skip_missing=true, const bool &nucleic_acid=true)
delcaration of routines for comparing DNA sequences This file declares a set of functions useful for ...
CodonUsageTable makeCodonUsageTable(const Seq *sequence)