Next version of JABA
[jabaws.git] / binaries / src / clustalw / src / multipleAlign / MyersMillerProfileAlign.h
1 /**
2  * Author: Mark Larkin
3  * 
4  * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
5  */
6 #ifndef MYERSMILLERPROFILEALIGN_H
7 #define MYERSMILLERPROFILEALIGN_H
8
9 #include <vector>
10 #include "ProfileAlignAlgorithm.h"
11 #include "ProfileStandard.h"
12 #include "ProfileWithSub.h"
13 namespace clustalw
14 {
15
16 class MyersMillerProfileAlign : public ProfileAlignAlgorithm
17 {
18     public:
19   virtual ~MyersMillerProfileAlign(){};
20
21     /* Functions */
22         MyersMillerProfileAlign();
23         virtual int profileAlign(Alignment* alnPtr, DistMatrix* distMat, 
24                                  vector<int>* group, int* aligned);
25     /* Attributes */
26     
27     private:
28     /* Functions */
29         void addGGaps(Alignment* alnPtr, SeqArray* seqArray);
30         void addGGapsMask(vector<char>* mask,int len, vector<int>* path1, vector<int>* path2);
31         int prfScore(int n, int m);
32         int progTracepath();
33         void progDel(int k);
34         void progAdd(int k);
35         void progAlign();
36         int progDiff(int A, int B, int M, int N, int go1, int go2);
37         int openPenalty1(int i, int j);
38         int extPenalty1(int i, int j);
39         int gapPenalty1(int i, int j, int k);
40         int openPenalty2(int i, int j);
41         int extPenalty2(int i, int j);
42         int gapPenalty2(int i, int j, int k);    
43     /* Attributes */
44         ProfileWithSub* profileWithSub;
45         ProfileStandard* profileStandard;
46         int gapcoef1;
47         int gapcoef2;
48         int lencoef1;
49         int lencoef2;
50         vector<int> displ;
51         vector<int> gS;
52         vector<int> HH;
53         vector<int> DD;
54         vector<int> RR;
55         vector<int> SS;
56         vector<int> alnPath1;
57         vector<int> alnPath2;
58         int printPtr;
59         int lastPrint;                        
60         int matrix[32][32];
61         vector<int> gaps;
62         bool switchProfiles;
63         const SeqArray* profile1;
64         const SeqArray* profile2;
65         int _gapPos1, _gapPos2;
66         int alignmentLength;                   
67 };
68
69 }
70 #endif