File: profile.h

package info (click to toggle)
muscle 3.52-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,196 kB
  • ctags: 1,763
  • sloc: cpp: 21,335; xml: 185; makefile: 104
file content (111 lines) | stat: -rw-r--r-- 4,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#ifndef FastProf2_h
#define FastProf2_h

#include "msa.h"
#include "pwpath.h"
#include <math.h>	// for log function

class DiagList;
class WeightList;

struct ProfPos
	{
	bool m_bAllGaps;
	unsigned m_uSortOrder[21];
	FCOUNT m_fcCounts[20];
	FCOUNT m_LL;
	FCOUNT m_LG;
	FCOUNT m_GL;
	FCOUNT m_GG;
	SCORE m_AAScores[20];
	unsigned m_uResidueGroup;
	FCOUNT m_fOcc;
	FCOUNT m_fcStartOcc;
	FCOUNT m_fcEndOcc;
	SCORE m_scoreGapOpen;
	SCORE m_scoreGapClose;
//	SCORE m_scoreGapExtend;
	};

struct ProgNode
	{
	MSA m_MSA;
	ProfPos *m_Prof;
	PWPath m_Path;
	short *m_EstringL;
	short *m_EstringR;
	unsigned m_uLength;
	WEIGHT m_Weight;
	};

extern unsigned ResidueGroup[];
const unsigned RESIDUE_GROUP_MULTIPLE = (unsigned) ~0;

extern PTR_SCOREMATRIX g_ptrScoreMatrix;

ProfPos *ProfileFromMSA(const MSA &a, SCORE scoreGapOpen, bool bTermGapsFree);

SCORE TraceBack(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,
  unsigned uLengthB, const SCORE *DPM_, const SCORE *DPD_, const SCORE *DPI_,
  PWPath &Path);
SCORE GlobalAlign(const ProfPos *PA, unsigned uLengthA, const ProfPos *PB,
  unsigned uLengthB, PWPath &Path);
void ProgressiveAlign(const SeqVect &v, const Tree &tree, MSA &a);
SCORE MSAPairSP(const MSA &msa1, const MSA &msa2);

void AlignTwoMSAsGivenPath(const PWPath &Path, const MSA &msaA, const MSA &msaB,
  MSA &msaCombined);

void ListProfile(const ProfPos *Prof, unsigned uLength, const MSA *ptrMSA = 0);
SCORE ScoreProfPos2(const ProfPos &PPA, const ProfPos &PPB);
SCORE FastScorePath2(const ProfPos *PA, unsigned uLengthA,
  const ProfPos *PB, unsigned uLengthB, const PWPath &Path);
bool IsHydrophilic(const FCOUNT fcCounts[]);
int PAM200_Letter(unsigned uLetter1, unsigned uLetter2);
SCORE AverageMatchScore(const PWPath &Path, unsigned uEdgeIndex,
  unsigned uWindowLength);
void WindowSmooth(const SCORE Score[], unsigned uCount, unsigned uWindowLength,
  SCORE SmoothScore[], double dCeil = 9e29);
SCORE FastScoreMSA_LA(const MSA &msa, SCORE MatchScore[] = 0);
SCORE FastScoreMSA_NS(const MSA &msa, SCORE MatchScore[] = 0);
SCORE FastScoreMSA_SP(const MSA &msa, SCORE MatchScore[] = 0);
bool RefineMSA(MSA &msa, const Tree &tree);
SCORE MSAQScore(const MSA &msa, SCORE MatchScore[] = 0);
bool TermGapsFree(unsigned uLength1, unsigned uLength2);
bool RefineBiParts(MSA &msa, const Tree &tree, bool R);
void FindAnchorCols(const MSA &msa, unsigned AnchorCols[],
  unsigned *ptruAnchorColCount);
double PctIdToHeight(double dPctId);
double PctIdToHeightKimura(double dPctId);
double PctIdToHeightMAFFT(double dPctId);
double PctIdToMAFFTDist(double dPctId);
bool RefineBlocks(MSA &msa, const Tree &tree);
bool RefineSubfams(MSA &msaIn, const Tree &tree, unsigned uIters);
void SetMuscleTree(const Tree &tree);
void CalcClustalWWeights(const Tree &tree, WEIGHT Weights[]);
void RealignDiffs(const MSA &msaIn, const Tree &Diffs,
  const unsigned IdToDiffsTreeNodeIndex[], MSA &msaOut);
void RealignDiffsE(const MSA &msaIn, const SeqVect &v,
  const Tree &NewTree, const Tree &OldTree,
  const unsigned uNewNodeIndexToOldNodeIndex[],
  MSA &msaOut, ProgNode *OldProgNodes);
void RefineTree(MSA &msa, Tree &tree);
void RefineTreeE(MSA &msa, const SeqVect &v, Tree &tree, ProgNode *ProgNodes);
void SetScoreMatrix();
extern bool IsHydrophobic(const FCOUNT fcCounts[]);
void Hydro(ProfPos *Prof, unsigned uLength);

// Macros to simulate 2D matrices
#define DPM(PLA, PLB)	DPM_[(PLB)*uPrefixCountA + (PLA)]
#define DPD(PLA, PLB)	DPD_[(PLB)*uPrefixCountA + (PLA)]
#define DPI(PLA, PLB)	DPI_[(PLB)*uPrefixCountA + (PLA)]
#define DPU(PLA, PLB)	DPU_[(PLB)*uPrefixCountA + (PLA)]
#define TBM(PLA, PLB)	TBM_[(PLB)*uPrefixCountA + (PLA)]
#define TBD(PLA, PLB)	TBD_[(PLB)*uPrefixCountA + (PLA)]
#define TBI(PLA, PLB)	TBI_[(PLB)*uPrefixCountA + (PLA)]

SCORE ScoreProfPos2LA(const ProfPos &PPA, const ProfPos &PPB);
SCORE ScoreProfPos2NS(const ProfPos &PPA, const ProfPos &PPB);
SCORE ScoreProfPos2SP(const ProfPos &PPA, const ProfPos &PPB);

#endif // FastProf_h