File: LeftAlign.h

package info (click to toggle)
libsmithwaterman 0.0+git20160702.2610e25-11
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 296 kB
  • sloc: cpp: 2,115; makefile: 59; sh: 16
file content (32 lines) | stat: -rw-r--r-- 882 bytes parent folder | download | duplicates (5)
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