forked from ekg/smithwaterman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLeftAlign.h
32 lines (24 loc) · 882 Bytes
/
LeftAlign.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __LEFTALIGN_H
#define __LEFTALIGN_H
#include <algorithm>
#include <map>
#include <vector>
#include <list>
#include <utility>
#include <sstream>
#include "IndelAllele.h"
#include "convert.h"
#ifdef VERBOSE_DEBUG
#define LEFTALIGN_DEBUG(msg) \
if (debug) { cerr << msg; }
#else
#define LEFTALIGN_DEBUG(msg)
#endif
using namespace std;
bool leftAlign(string& alternateQuery, string& cigar, string& referenceSequence, int& offset, bool debug = false);
bool stablyLeftAlign(string alternateQuery, string& cigar, string referenceSequence, int& offset, int maxiterations = 20, bool debug = false);
int countMismatches(string& alternateQuery, string& cigar, string& referenceSequence);
string mergeCIGAR(const string& c1, const string& c2);
vector<pair<int, string> > splitCIGAR(const string& cigarStr);
string joinCIGAR(const vector<pair<int, string> >& cigar);
#endif