Next version of JABA
[jabaws.git] / binaries / src / muscle / glbalign352.cpp
1 #include "muscle.h"\r
2 #include "pwpath.h"\r
3 #include "timing.h"\r
4 #include "textfile.h"\r
5 #include "msa.h"\r
6 #include "profile.h"\r
7 \r
8 #if     VER_3_52\r
9 \r
10 #if     TIMING\r
11 TICKS g_ticksDP = 0;\r
12 #endif\r
13 \r
14 SCORE GlobalAlign(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,\r
15   unsigned uLengthB, PWPath &Path)\r
16         {\r
17 #if     TIMING\r
18         TICKS t1 = GetClockTicks();\r
19 #endif\r
20         SCORE Score = 0;\r
21         if (g_bDiags)\r
22                 Score = GlobalAlignDiags(PA, uLengthA, PB, uLengthB, Path);\r
23         else\r
24                 Score = GlobalAlignNoDiags(PA, uLengthA, PB, uLengthB, Path);\r
25 #if     TIMING\r
26         TICKS t2 = GetClockTicks();\r
27         g_ticksDP += (t2 - t1);\r
28 #endif\r
29         return Score;\r
30         }\r
31 \r
32 SCORE GlobalAlignNoDiags(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,\r
33   unsigned uLengthB, PWPath &Path)\r
34         {\r
35         if (g_bDimer)\r
36                 return GlobalAlignDimer(PA, uLengthA, PB, uLengthB, Path);\r
37 \r
38         switch (g_PPScore)\r
39                 {\r
40         case PPSCORE_LE:\r
41                 return GlobalAlignLE(PA, uLengthA, PB, uLengthB, Path);\r
42 \r
43         case PPSCORE_SP:\r
44         case PPSCORE_SV:\r
45                 return GlobalAlignSP(PA, uLengthA, PB, uLengthB, Path);\r
46 \r
47         case PPSCORE_SPN:\r
48                 return GlobalAlignSPN(PA, uLengthA, PB, uLengthB, Path);\r
49                 }\r
50 \r
51         Quit("Invalid PP score (GlobalAlignNoDiags)");\r
52         return 0;\r
53         }\r
54 \r
55 #endif  // VER_3_52\r