Classes and functions to aid in the calculations of the pathways between two codons

Classes

class  Sequence::shortestPath
 Calculate shortest path between 2 codons. More...

Functions

void Sequence::Intermediates2 (string *intermediates, const std::string &codon1, const std::string &codon2)
 Calculate the intermediate codons between a pair of codons diverged at 2 positions.
void Sequence::Intermediates3 (string *intermediates, const std::string &codon1, const std::string &codon2)
 Calculate the intermediate codons between a pair of codons diverged at 3 positions.
std::pair< unsigned, unsigned > Sequence::mutsShortestPath (const std::string &codon1, const std::string &codon2, const Sequence::GeneticCodes &code) throw (Sequence::SeqException)

Detailed Description

This group of classes and functions deals with determining either the counts of silent and replacement differences between codons or the intermedate codons that occurs between two different codons


Function Documentation

void Sequence::Intermediates2 ( string *  intermediates,
const std::string &  codon1,
const std::string &  codon2 
)

Calculate the intermediate codons between a pair of codons diverged at 2 positions.

Parameters:
intermediates a string[2] in which we will place the intermediate codons
codon1 a codon
codon2 a codon

Definition at line 33 of file PathwayHelper.cc.

void Sequence::Intermediates3 ( string *  intermediates,
const std::string &  codon1,
const std::string &  codon2 
)

Calculate the intermediate codons between a pair of codons diverged at 3 positions.

Parameters:
intermediates a string[9] in which we will place the intermediate codons
codon1 a codon
codon2 a codon
Note:
the storage of the intermediate codons follows the illustration in the documentation of Sequence::ThreeSubs

Definition at line 92 of file PathwayHelper.cc.

std::pair< unsigned, unsigned > Sequence::mutsShortestPath ( const std::string &  codon1,
const std::string &  codon2,
const Sequence::GeneticCodes code 
) throw (Sequence::SeqException)
Returns:
a std::pair<unsigned,unsigned> representing the number of silent and replacement changes b/w 2 codons, as calculated by Sequence::shortestPath. The first member of the pair is the number of silent changes in the shortest path, and the second the number of replacement changes. If the pathway type is shortestPath::AMBIG, both members of the return value will be equal to Sequence::SEQMAXUNSIGNED, which is declared in <Sequence/SeqConstants.hpp>

For example:

    #include <Sequence/shortestPath.hpp>
    #include <iostream>
    int main(int argc, char **argv)
    {
    //the shortest path between AAA and GGG, using the universal code,
    //requires 1 silent and 2 replacement changes.
    std::pair<unsigned,unsigned> muts = Sequence::mutsShortestPath("AAA","GGG");
    std::cout << muts.first
    << ' '
    << muts.second
    << std::endl;
    }
Generated on Thu Aug 11 13:22:00 2011 for libsequence by  doxygen 1.6.3