--- /dev/null
+#include "muscle.h"\r
+#include "msa.h"\r
+#include "profile.h"\r
+#include "pwpath.h"\r
+#include "textfile.h"\r
+#include "timing.h"\r
+\r
+SCORE AlignTwoMSAs(const MSA &msa1, const MSA &msa2, MSA &msaOut, PWPath &Path,\r
+ bool bLockLeft, bool bLockRight)\r
+ {\r
+ const unsigned uLengthA = msa1.GetColCount();\r
+ const unsigned uLengthB = msa2.GetColCount();\r
+\r
+ ProfPos *PA = ProfileFromMSA(msa1);\r
+ ProfPos *PB = ProfileFromMSA(msa2);\r
+\r
+ if (bLockLeft)\r
+ {\r
+ PA[0].m_scoreGapOpen = MINUS_INFINITY;\r
+ PB[0].m_scoreGapOpen = MINUS_INFINITY;\r
+ }\r
+\r
+ if (bLockRight)\r
+ {\r
+ PA[uLengthA-1].m_scoreGapClose = MINUS_INFINITY;\r
+ PB[uLengthB-1].m_scoreGapClose = MINUS_INFINITY;\r
+ }\r
+\r
+ float r = (float) uLengthA/ (float) (uLengthB + 1); // +1 to prevent div 0\r
+ if (r < 1)\r
+ r = 1/r;\r
+\r
+ SCORE Score = GlobalAlign(PA, uLengthA, PB, uLengthB, Path);\r
+\r
+ AlignTwoMSAsGivenPath(Path, msa1, msa2, msaOut);\r
+\r
+ delete[] PA;\r
+ delete[] PB;\r
+\r
+ return Score;\r
+ }\r