forked from mothur/mothur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alignment.hpp
62 lines (51 loc) · 1.47 KB
/
alignment.hpp
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef DPALIGNMENT_H
#define DPALIGNMENT_H
/*
* dpalignment.h
*
*
* Created by Pat Schloss on 12/15/08.
* Copyright 2008 Patrick D. Schloss. All rights reserved.
*
* This is a class for an abstract datatype for classes that implement various types of alignment algorithms.
* As of 12/18/08 these included alignments based on blastn, needleman-wunsch, and the Gotoh algorithms
*
*/
#include "mothur.h"
#include "alignmentcell.hpp"
/**************************************************************************************************/
class Alignment {
public:
Alignment(int);
Alignment();
virtual ~Alignment();
virtual void align(string, string) = 0;
virtual void alignPrimer(string, string) {}
// float getAlignmentScore();
string getSeqAAln();
string getSeqBAln();
map<int, int> getSeqAAlnBaseMap();
map<int, int> getSeqBAlnBaseMap();
int getCandidateStartPos();
int getCandidateEndPos();
int getTemplateStartPos();
int getTemplateEndPos();
int getPairwiseLength();
void resize(int);
int getnRows() { return nRows; }
// int getLongestTemplateGap();
protected:
void traceBack();
string seqA, seqAaln;
string seqB, seqBaln;
int seqAstart, seqAend;
int seqBstart, seqBend;
int pairwiseLength;
int nRows, nCols, lA, lB;
vector<vector<AlignmentCell> > alignment;
map<int, int> ABaseMap;
map<int, int> BBaseMap;
MothurOut* m;
};
/**************************************************************************************************/
#endif