]> git.donarmstrong.com Git - mothur.git/blob - alignment.hpp
added check to cluster.classic to make sure file type is phylip. added mapping funct...
[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         
29         
30 //      float getAlignmentScore();
31         string getSeqAAln();
32         string getSeqBAln();
33     map<int, int> getSeqAAlnBaseMap();
34     map<int, int> getSeqBAlnBaseMap();
35         int getCandidateStartPos();
36         int getCandidateEndPos();
37         int getTemplateStartPos();
38         int getTemplateEndPos();
39         
40         int getPairwiseLength();
41         void resize(int);
42         int getnRows() { return nRows; }
43 //      int getLongestTemplateGap();
44
45 protected:
46         void traceBack();
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 #endif