1 #ifndef DPALIGNMENT_H
2 #define DPALIGNMENT_H
3 
4 /*
5  *  dpalignment.h
6  *
7  *
8  *  Created by Pat Schloss on 12/15/08.
9  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
10  *
11  *  This is a class for an abstract datatype for classes that implement various types of alignment	algorithms.
12  *	As of 12/18/08 these included alignments based on blastn, needleman-wunsch, and the	Gotoh algorithms
13  *
14  */
15 
16 #include "mothur.h"
17 #include "alignmentcell.hpp"
18 #include "currentfile.h"
19 
20 /**************************************************************************************************/
21 
22 class Alignment {
23 
24 public:
25 	Alignment(int);
26     Alignment(int, int);
27 	Alignment();
28 	virtual ~Alignment();
29 	virtual void align(string, string, bool createBaseMap=false) = 0;
alignPrimer(string,string)30     virtual void alignPrimer(string, string) {}
31 
32 	string getSeqAAln();
33 	string getSeqBAln();
34     map<int, int> getSeqAAlnBaseMap();
35     map<int, int> getSeqBAlnBaseMap();
36 	int getCandidateStartPos();
37 	int getCandidateEndPos();
38 	int getTemplateStartPos();
39 	int getTemplateEndPos();
40 
41 	int getPairwiseLength();
42 	virtual void resize(int);
getnRows()43 	int getnRows() { return nRows; }
44 
45 protected:
46 	void traceBack(bool createBaseMap);
47 	string seqA, seqAaln;
48 	string seqB, seqBaln;
49 	int seqAstart, seqAend;
50 	int seqBstart, seqBend;
51 	int pairwiseLength;
52 	int nRows, nCols, lA, lB;
53 	vector<vector<AlignmentCell> > alignment;
54     map<int, int> ABaseMap;
55     map<int, int> BBaseMap;
56 	MothurOut* m;
57 
58 };
59 
60 /**************************************************************************************************/
61 
62 #endif
63