codon.h
Go to the documentation of this file.00001 #ifndef CODON_H
00002 #define CODON_H
00003
00004 #include <map>
00005 #include <string>
00006 #include <iostream>
00007
00008 using namespace std;
00009
00010
00011
00012
00013
00014
00015 int hashbase(char n);
00016
00017
00018
00019 int hashcodon(char c[3]);
00020 int hashcodon(const string &cc);
00021
00022 class codon {
00023 public:
00024
00025 codon();
00026
00027
00028
00029
00030
00031 codon(const std::string &def);
00032 char operator[](const string &cd);
00033 char operator[](char cc[3]);
00034 map<char,double> getAAUniformFrequency() const;
00035
00036 private:
00037 map<string, char> tab;
00038 char nuc2aa[65];
00039 void convert();
00040 };
00041
00042
00043
00044
00061
00062
00063 #endif