1 #ifndef __LEFTALIGN_H
2 #define __LEFTALIGN_H
3 
4 #include <algorithm>
5 #include <map>
6 #include <vector>
7 #include <list>
8 #include <utility>
9 #include <sstream>
10 
11 #include "IndelAllele.h"
12 #include "convert.h"
13 
14 #ifdef VERBOSE_DEBUG
15 #define LEFTALIGN_DEBUG(msg) \
16     if (debug) { cerr << msg; }
17 #else
18 #define LEFTALIGN_DEBUG(msg)
19 #endif
20 
21 using namespace std;
22 
23 bool leftAlign(string& alternateQuery, string& cigar, string& referenceSequence, int& offset, bool debug = false);
24 bool stablyLeftAlign(string alternateQuery, string& cigar, string referenceSequence, int& offset, int maxiterations = 20, bool debug = false);
25 int countMismatches(string& alternateQuery, string& cigar, string& referenceSequence);
26 
27 string mergeCIGAR(const string& c1, const string& c2);
28 vector<pair<int, string> > splitCIGAR(const string& cigarStr);
29 string joinCIGAR(const vector<pair<int, string> >& cigar);
30 
31 
32 #endif
33