6 #include <math.h> // for log function
\r
14 unsigned m_uSortOrder[21];
\r
15 FCOUNT m_fcCounts[20];
\r
20 SCORE m_AAScores[20];
\r
21 unsigned m_uResidueGroup;
\r
23 FCOUNT m_fcStartOcc;
\r
25 SCORE m_scoreGapOpen;
\r
26 SCORE m_scoreGapClose;
\r
28 SCORE m_scoreGapOpen2;
\r
29 SCORE m_scoreGapClose2;
\r
31 // SCORE m_scoreGapExtend;
\r
51 extern unsigned ResidueGroup[];
\r
52 const unsigned RESIDUE_GROUP_MULTIPLE = (unsigned) ~0;
\r
54 extern PTR_SCOREMATRIX g_ptrScoreMatrix;
\r
56 ProfPos *ProfileFromMSA(const MSA &a);
\r
58 SCORE TraceBack(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,
\r
59 unsigned uLengthB, const SCORE *DPM_, const SCORE *DPD_, const SCORE *DPI_,
\r
61 SCORE GlobalAlign(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,
\r
62 unsigned uLengthB, PWPath &Path);
\r
63 void ProgressiveAlign(const SeqVect &v, const Tree &tree, MSA &a);
\r
64 SCORE MSAPairSP(const MSA &msa1, const MSA &msa2);
\r
66 void AlignTwoMSAsGivenPath(const PWPath &Path, const MSA &msaA, const MSA &msaB,
\r
69 void ListProfile(const ProfPos *Prof, unsigned uLength, const MSA *ptrMSA = 0);
\r
70 SCORE ScoreProfPos2(const ProfPos &PPA, const ProfPos &PPB);
\r
71 SCORE FastScorePath2(const ProfPos *PA, unsigned uLengthA,
\r
72 const ProfPos *PB, unsigned uLengthB, const PWPath &Path);
\r
73 bool IsHydrophilic(const FCOUNT fcCounts[]);
\r
74 int PAM200_Letter(unsigned uLetter1, unsigned uLetter2);
\r
75 SCORE AverageMatchScore(const PWPath &Path, unsigned uEdgeIndex,
\r
76 unsigned uWindowLength);
\r
77 void WindowSmooth(const SCORE Score[], unsigned uCount, unsigned uWindowLength,
\r
78 SCORE SmoothScore[], double dCeil = 9e29);
\r
79 SCORE FastScoreMSA_LA(const MSA &msa, SCORE MatchScore[] = 0);
\r
80 SCORE FastScoreMSA_NS(const MSA &msa, SCORE MatchScore[] = 0);
\r
81 SCORE FastScoreMSA_SP(const MSA &msa, SCORE MatchScore[] = 0);
\r
82 bool RefineMSA(MSA &msa, const Tree &tree);
\r
83 SCORE MSAQScore(const MSA &msa, SCORE MatchScore[] = 0);
\r
84 bool RefineBiParts(MSA &msa, const Tree &tree, bool R);
\r
85 void FindAnchorCols(const MSA &msa, unsigned AnchorCols[],
\r
86 unsigned *ptruAnchorColCount);
\r
87 double PctIdToHeight(double dPctId);
\r
88 double PctIdToHeightKimura(double dPctId);
\r
89 double PctIdToHeightMAFFT(double dPctId);
\r
90 double PctIdToMAFFTDist(double dPctId);
\r
91 bool RefineBlocks(MSA &msa, const Tree &tree);
\r
92 bool RefineSubfams(MSA &msaIn, const Tree &tree, unsigned uIters);
\r
93 void SetMuscleTree(const Tree &tree);
\r
94 void CalcClustalWWeights(const Tree &tree, WEIGHT Weights[]);
\r
95 void RealignDiffs(const MSA &msaIn, const Tree &Diffs,
\r
96 const unsigned IdToDiffsTreeNodeIndex[], MSA &msaOut);
\r
97 void RealignDiffsE(const MSA &msaIn, const SeqVect &v,
\r
98 const Tree &NewTree, const Tree &OldTree,
\r
99 const unsigned uNewNodeIndexToOldNodeIndex[],
\r
100 MSA &msaOut, ProgNode *OldProgNodes);
\r
101 void RefineTree(MSA &msa, Tree &tree);
\r
102 void RefineTreeE(MSA &msa, const SeqVect &v, Tree &tree, ProgNode *ProgNodes);
\r
103 bool IsHydrophobic(const FCOUNT fcCounts[]);
\r
104 void Hydro(ProfPos *Prof, unsigned uLength);
\r
105 void SetTermGaps(const ProfPos *Prof, unsigned uLength);
\r
107 // Macros to simulate 2D matrices
\r
108 #define DPL(PLA, PLB) DPL_[(PLB)*uPrefixCountA + (PLA)]
\r
109 #define DPM(PLA, PLB) DPM_[(PLB)*uPrefixCountA + (PLA)]
\r
110 #define DPD(PLA, PLB) DPD_[(PLB)*uPrefixCountA + (PLA)]
\r
111 #define DPE(PLA, PLB) DPE_[(PLB)*uPrefixCountA + (PLA)]
\r
112 #define DPI(PLA, PLB) DPI_[(PLB)*uPrefixCountA + (PLA)]
\r
113 #define DPJ(PLA, PLB) DPJ_[(PLB)*uPrefixCountA + (PLA)]
\r
114 #define DPU(PLA, PLB) DPU_[(PLB)*uPrefixCountA + (PLA)]
\r
115 #define TBM(PLA, PLB) TBM_[(PLB)*uPrefixCountA + (PLA)]
\r
116 #define TBD(PLA, PLB) TBD_[(PLB)*uPrefixCountA + (PLA)]
\r
117 #define TBE(PLA, PLB) TBE_[(PLB)*uPrefixCountA + (PLA)]
\r
118 #define TBI(PLA, PLB) TBI_[(PLB)*uPrefixCountA + (PLA)]
\r
119 #define TBJ(PLA, PLB) TBJ_[(PLB)*uPrefixCountA + (PLA)]
\r
121 SCORE ScoreProfPos2LA(const ProfPos &PPA, const ProfPos &PPB);
\r
122 SCORE ScoreProfPos2NS(const ProfPos &PPA, const ProfPos &PPB);
\r
123 SCORE ScoreProfPos2SP(const ProfPos &PPA, const ProfPos &PPB);
\r
124 SCORE ScoreProfPos2SPN(const ProfPos &PPA, const ProfPos &PPB);
\r
126 #endif // FastProf_h
\r