]> git.donarmstrong.com Git - mothur.git/blob - alignment.hpp
added alignment code
[mothur.git] / alignment.hpp
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 using namespace std;
16
17 #include "mothur.h"
18 #include "alignmentcell.hpp"
19
20 /**************************************************************************************************/
21
22 class Alignment {
23         
24 public:
25         Alignment(int);
26         Alignment();
27         virtual void align(string, string) = 0;
28         
29         float getAlignmentScore();
30         string getSeqAAln();
31         string getSeqBAln();
32         int getCandidateStartPos();
33         int getCandidateEndPos();
34         int getTemplateStartPos();
35         int getTemplateEndPos();
36
37         int getPairwiseLength();
38 //      int getLongestTemplateGap();
39
40 protected:
41         void traceBack();
42         string seqA, seqAaln;
43         string seqB, seqBaln;
44         int seqAstart, seqAend;
45         int seqBstart, seqBend;
46         int pairwiseLength;
47         int nRows, nCols, lA, lB;
48         vector<vector<AlignmentCell> > alignment;
49 };
50
51 /**************************************************************************************************/
52
53 #endif