00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __SHORTEST_PATH_HPP__
00025 #define __SHORTEST_PATH_HPP__
00026 #include <vector>
00027 #include <utility>
00028 #include <memory>
00029 #include <Sequence/SeqEnums.hpp>
00030 #include <Sequence/SeqExceptions.hpp>
00031 #include <boost/tuple/tuple.hpp>
00051 namespace Sequence
00052 {
00053 class shortestPathImpl;
00054 class shortestPath
00055 {
00056 private:
00057 std::auto_ptr<shortestPathImpl> impl;
00058 public:
00067 enum pathType {S,N,SS,SN,NN,SSS,SSN,SNN,NNN,NONE,AMBIG};
00068
00069 explicit shortestPath(const std::string &codon1,
00070 const std::string &codon2,
00071 const Sequence::GeneticCodes & code = Sequence::UNIVERSAL)
00072 throw (Sequence::SeqException);
00073 ~shortestPath();
00074 pathType type() const;
00075 double path_distance() const;
00076 typedef std::vector<std::string>::const_iterator const_iterator;
00077 const_iterator begin() const;
00078 const_iterator end() const;
00079 };
00080
00081 std::pair<unsigned,unsigned> mutsShortestPath(const std::string &codon1,
00082 const std::string &codon2,
00083 const Sequence::GeneticCodes
00084 & code = Sequence::UNIVERSAL)
00085 throw (Sequence::SeqException);
00086
00087 std::pair<unsigned,shortestPath::pathType> diffType(const std::string &codon1,
00088 const std::string &codon2,
00089 const Sequence::GeneticCodes
00090 & code = Sequence::UNIVERSAL)
00091 throw (Sequence::SeqException);
00092
00093 boost::tuple<shortestPath::pathType,shortestPath::pathType,shortestPath::pathType>
00094 diffTypeMulti(const std::string &codon1,
00095 const std::string &codon2,
00096 const Sequence::GeneticCodes
00097 & code = Sequence::UNIVERSAL)
00098 throw (Sequence::SeqException);
00099 }
00100 #endif