Sequence::shortestPath Class Reference
[Classes and functions to aid in the calculations of the pathways between two codons]

Calculate shortest path between 2 codons. More...

#include <Sequence/shortestPath.hpp>

List of all members.

Public Types

enum  pathType {
  S, N, SS, SN,
  NN, SSS, SSN, SNN,
  NNN, NONE, AMBIG
}
typedef std::vector
< std::string >
::const_iterator 
const_iterator

Public Member Functions

 shortestPath (const std::string &codon1, const std::string &codon2, const Sequence::GeneticCodes &code=Sequence::UNIVERSAL) throw (Sequence::SeqException)
pathType type () const
double path_distance () const
const_iterator begin () const
const_iterator end () const

Detailed Description

Calculate shortest path between 2 codons.

A class which calculates the shortest path between two codons. The length of a path is in terms of the sum of the Grantham's distances along it's branches.

Note:
It is often the case (esp. when codons differ at all three sites) that the various paths are of equal length. What this means is that the order in which the changes occur don't matter. In such cases, one of the paths is returned arbitrarily.

Definition at line 54 of file shortestPath.hpp.


Member Enumeration Documentation

An enum type to describe the shortest path between 2 codons. An S refers to a synonymous change, N nonsynonymous. For example, SSN means that the shortest path b/w 2 codons requires 2 synonymous and 1 nonsynonymous change. If the 2 codons don't differ, the value is NONE. If the path cannot be determined, the value is AMBIG

Definition at line 67 of file shortestPath.hpp.


Constructor & Destructor Documentation

Sequence::shortestPath::shortestPath ( const std::string &  codon1,
const std::string &  codon2,
const Sequence::GeneticCodes code = Sequence::UNIVERSAL 
) throw (Sequence::SeqException) [explicit]
Parameters:
codon1 a std::string of length 3
codon2 a std::string of length 3
code which genetic code to use
Precondition:
(codon1.length() == 3 && codon2.length() ==3)
Note:
If either codon1 or codon2 contain characters other than {A,G,C,T}, the pathway type will be assigned shortestPath::AMBIG

Definition at line 253 of file shortestPath.cc.


Member Function Documentation

shortestPath::const_iterator Sequence::shortestPath::begin (  )  const
Returns:
an iterator to the beginning of the shortest path between the 2 codons. The value type if the iterator is std::string

Definition at line 297 of file shortestPath.cc.

shortestPath::const_iterator Sequence::shortestPath::end (  )  const
Returns:
an iterator to the end of the shortest path between the 2 codons. The value type if the iterator is std::string

Definition at line 307 of file shortestPath.cc.

double Sequence::shortestPath::path_distance (  )  const
Returns:
the total Grantham's distance of the shortest path

Definition at line 317 of file shortestPath.cc.

shortestPath::pathType Sequence::shortestPath::type (  )  const
Returns:
a value from the enum type shortestPath::pathType representing the type of the shortest path.

Definition at line 288 of file shortestPath.cc.


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