Mac binaries
[jabaws.git] / website / archive / binaries / mac / src / muscle / profile.h
diff --git a/website/archive/binaries/mac/src/muscle/profile.h b/website/archive/binaries/mac/src/muscle/profile.h
new file mode 100644 (file)
index 0000000..e0b68bc
--- /dev/null
@@ -0,0 +1,126 @@
+#ifndef FastProf2_h\r
+#define FastProf2_h\r
+\r
+#include "msa.h"\r
+#include "pwpath.h"\r
+#include <math.h>      // for log function\r
+\r
+class DiagList;\r
+class WeightList;\r
+\r
+struct ProfPos\r
+       {\r
+       bool m_bAllGaps;\r
+       unsigned m_uSortOrder[21];\r
+       FCOUNT m_fcCounts[20];\r
+       FCOUNT m_LL;\r
+       FCOUNT m_LG;\r
+       FCOUNT m_GL;\r
+       FCOUNT m_GG;\r
+       SCORE m_AAScores[20];\r
+       unsigned m_uResidueGroup;\r
+       FCOUNT m_fOcc;\r
+       FCOUNT m_fcStartOcc;\r
+       FCOUNT m_fcEndOcc;\r
+       SCORE m_scoreGapOpen;\r
+       SCORE m_scoreGapClose;\r
+#if    DOUBLE_AFFINE\r
+       SCORE m_scoreGapOpen2;\r
+       SCORE m_scoreGapClose2;\r
+#endif\r
+//     SCORE m_scoreGapExtend;\r
+       };\r
+\r
+struct ProgNode\r
+       {\r
+       ProgNode()\r
+               {\r
+               m_Prof = 0;\r
+               m_EstringL = 0;\r
+               m_EstringR = 0;\r
+               }\r
+       MSA m_MSA;\r
+       ProfPos *m_Prof;\r
+       PWPath m_Path;\r
+       short *m_EstringL;\r
+       short *m_EstringR;\r
+       unsigned m_uLength;\r
+       WEIGHT m_Weight;\r
+       };\r
+\r
+extern unsigned ResidueGroup[];\r
+const unsigned RESIDUE_GROUP_MULTIPLE = (unsigned) ~0;\r
+\r
+extern PTR_SCOREMATRIX g_ptrScoreMatrix;\r
+\r
+ProfPos *ProfileFromMSA(const MSA &a);\r
+\r
+SCORE TraceBack(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,\r
+  unsigned uLengthB, const SCORE *DPM_, const SCORE *DPD_, const SCORE *DPI_,\r
+  PWPath &Path);\r
+SCORE GlobalAlign(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,\r
+  unsigned uLengthB, PWPath &Path);\r
+void ProgressiveAlign(const SeqVect &v, const Tree &tree, MSA &a);\r
+SCORE MSAPairSP(const MSA &msa1, const MSA &msa2);\r
+\r
+void AlignTwoMSAsGivenPath(const PWPath &Path, const MSA &msaA, const MSA &msaB,\r
+  MSA &msaCombined);\r
+\r
+void ListProfile(const ProfPos *Prof, unsigned uLength, const MSA *ptrMSA = 0);\r
+SCORE ScoreProfPos2(const ProfPos &PPA, const ProfPos &PPB);\r
+SCORE FastScorePath2(const ProfPos *PA, unsigned uLengthA,\r
+  const ProfPos *PB, unsigned uLengthB, const PWPath &Path);\r
+bool IsHydrophilic(const FCOUNT fcCounts[]);\r
+int PAM200_Letter(unsigned uLetter1, unsigned uLetter2);\r
+SCORE AverageMatchScore(const PWPath &Path, unsigned uEdgeIndex,\r
+  unsigned uWindowLength);\r
+void WindowSmooth(const SCORE Score[], unsigned uCount, unsigned uWindowLength,\r
+  SCORE SmoothScore[], double dCeil = 9e29);\r
+SCORE FastScoreMSA_LA(const MSA &msa, SCORE MatchScore[] = 0);\r
+SCORE FastScoreMSA_NS(const MSA &msa, SCORE MatchScore[] = 0);\r
+SCORE FastScoreMSA_SP(const MSA &msa, SCORE MatchScore[] = 0);\r
+bool RefineMSA(MSA &msa, const Tree &tree);\r
+SCORE MSAQScore(const MSA &msa, SCORE MatchScore[] = 0);\r
+bool RefineBiParts(MSA &msa, const Tree &tree, bool R);\r
+void FindAnchorCols(const MSA &msa, unsigned AnchorCols[],\r
+  unsigned *ptruAnchorColCount);\r
+double PctIdToHeight(double dPctId);\r
+double PctIdToHeightKimura(double dPctId);\r
+double PctIdToHeightMAFFT(double dPctId);\r
+double PctIdToMAFFTDist(double dPctId);\r
+bool RefineBlocks(MSA &msa, const Tree &tree);\r
+bool RefineSubfams(MSA &msaIn, const Tree &tree, unsigned uIters);\r
+void SetMuscleTree(const Tree &tree);\r
+void CalcClustalWWeights(const Tree &tree, WEIGHT Weights[]);\r
+void RealignDiffs(const MSA &msaIn, const Tree &Diffs,\r
+  const unsigned IdToDiffsTreeNodeIndex[], MSA &msaOut);\r
+void RealignDiffsE(const MSA &msaIn, const SeqVect &v,\r
+  const Tree &NewTree, const Tree &OldTree,\r
+  const unsigned uNewNodeIndexToOldNodeIndex[],\r
+  MSA &msaOut, ProgNode *OldProgNodes);\r
+void RefineTree(MSA &msa, Tree &tree);\r
+void RefineTreeE(MSA &msa, const SeqVect &v, Tree &tree, ProgNode *ProgNodes);\r
+bool IsHydrophobic(const FCOUNT fcCounts[]);\r
+void Hydro(ProfPos *Prof, unsigned uLength);\r
+void SetTermGaps(const ProfPos *Prof, unsigned uLength);\r
+\r
+// Macros to simulate 2D matrices\r
+#define DPL(PLA, PLB)  DPL_[(PLB)*uPrefixCountA + (PLA)]\r
+#define DPM(PLA, PLB)  DPM_[(PLB)*uPrefixCountA + (PLA)]\r
+#define DPD(PLA, PLB)  DPD_[(PLB)*uPrefixCountA + (PLA)]\r
+#define DPE(PLA, PLB)  DPE_[(PLB)*uPrefixCountA + (PLA)]\r
+#define DPI(PLA, PLB)  DPI_[(PLB)*uPrefixCountA + (PLA)]\r
+#define DPJ(PLA, PLB)  DPJ_[(PLB)*uPrefixCountA + (PLA)]\r
+#define DPU(PLA, PLB)  DPU_[(PLB)*uPrefixCountA + (PLA)]\r
+#define TBM(PLA, PLB)  TBM_[(PLB)*uPrefixCountA + (PLA)]\r
+#define TBD(PLA, PLB)  TBD_[(PLB)*uPrefixCountA + (PLA)]\r
+#define TBE(PLA, PLB)  TBE_[(PLB)*uPrefixCountA + (PLA)]\r
+#define TBI(PLA, PLB)  TBI_[(PLB)*uPrefixCountA + (PLA)]\r
+#define TBJ(PLA, PLB)  TBJ_[(PLB)*uPrefixCountA + (PLA)]\r
+\r
+SCORE ScoreProfPos2LA(const ProfPos &PPA, const ProfPos &PPB);\r
+SCORE ScoreProfPos2NS(const ProfPos &PPA, const ProfPos &PPB);\r
+SCORE ScoreProfPos2SP(const ProfPos &PPA, const ProfPos &PPB);\r
+SCORE ScoreProfPos2SPN(const ProfPos &PPA, const ProfPos &PPB);\r
+\r
+#endif // FastProf_h\r