]> git.donarmstrong.com Git - mothur.git/blob - alignment.hpp
fixes while testing 1.33.0
[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
16 #include "mothur.h"
17 #include "alignmentcell.hpp"
18
19 /**************************************************************************************************/
20
21 class Alignment {
22         
23 public:
24         Alignment(int);
25         Alignment();
26         virtual ~Alignment();
27         virtual void align(string, string) = 0;
28     virtual void alignPrimer(string, string) {}
29         
30         
31 //      float getAlignmentScore();
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         void resize(int);
43         int getnRows() { return nRows; }
44 //      int getLongestTemplateGap();
45
46 protected:
47         void traceBack();
48         string seqA, seqAaln;
49         string seqB, seqBaln;
50         int seqAstart, seqAend;
51         int seqBstart, seqBend;
52         int pairwiseLength;
53         int nRows, nCols, lA, lB;
54         vector<vector<AlignmentCell> > alignment;
55     map<int, int> ABaseMap;
56     map<int, int> BBaseMap;
57         MothurOut* m;
58 };
59
60 /**************************************************************************************************/
61
62 #endif