Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <map>
- #include <vector>
- using namespace std;
- struct ltstr
- {
- bool operator()(const char* s1, const char* s2) const
- {
- return strcmp(s1, s2) < 0;
- }
- };
- int main( )
- {
- map<const char*, int, ltstr> alphabet;
- alphabet["A"] = 0;
- alphabet["C"] = 1;
- alphabet["G"] = 2;
- alphabet["T"] = 3;
- string seed_word = "TTAA";
- vector<vector<double> > pwm;
- for( int i = 0; i < seed_word.length(); i++ )
- {
- cout << seed_word[i] << alphabet[& seed_word[i]] << "\t";
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement