This file is indexed.

/usr/include/libphylo/likelihoodComputation.h is in rate4site 3.0.0-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
// $Id: likelihoodComputation.h 9899 2011-10-11 19:56:48Z rubi $

#ifndef ___LIKELIHOOD_COMPUTATION
#define ___LIKELIHOOD_COMPUTATION

#include "definitions.h"
#include "computePijComponent.h"
#include "sequenceContainer.h"
#include "suffStatComponent.h"
#include "unObservableData.h"
#include "multipleStochasticProcess.h"
#include "gammaDistribution.h"
#include "distribution.h"


namespace likelihoodComputation {
// likelihood computation - full data (1)
	MDOUBLE getTreeLikelihoodAllPosAlphTheSame(const tree& et,
		const sequenceContainer& sc,
		const stochasticProcess& sp,
		const Vdouble * const weights = NULL,
		unObservableData *unObservableData_p=NULL);
//	likelihood computation - per pos (1.1)
	doubleRep getLofPos(const int pos,					// this function is used
		const tree& et,					// when gamma, and the br-len
		const sequenceContainer& sc,		// are the same for all pos.
		const computePijGam& pi,
		const stochasticProcess& sp,
		unObservableData *unObservableData_p=NULL);
// likelihood computation - per pos, per cat (1.1.1)
	doubleRep getLofPos(const int pos,					// this function is used
		const tree& et,					// when the br-len
		const sequenceContainer& sc,		// are the same for all
		const computePijHom& pi,			// positions.
		const stochasticProcess& sp,
		unObservableData *unObservableData_p=NULL);

//r4s_Proportional
// likelihood computation - full data (1)
	Vdouble getTreeLikelihoodProportionalAllPosAlphTheSame(const tree& et,
		const vector<sequenceContainer>& sc,
		multipleStochasticProcess* msp,
		const gammaDistribution* pProportionDist,
		const Vdouble * const weights = NULL);
//	likelihood computation - per pos (1.1)
//Old - remove when QA is done
	doubleRep getLofPosProportional(const int pos,					// this function is used
		const tree& et,					// when gamma, and the br-len
		const sequenceContainer& sc,		// are the same for all pos.
		const computePijGam& pi,
		const stochasticProcess& sp,
		const MDOUBLE globalRateProb);
	doubleRep getLofPosProportional(const int pos,					// this function is used
		const tree& et,					// when gamma, and the br-len
		const sequenceContainer& sc,		// are the same for all pos.
		const computePijGam& pi,
		const stochasticProcess& sp);
//r4s_Proportional



	// used when the likelihood given each category is needed, not only the sum	
	Vdouble getLofPosPerCat(const int pos,				
		const tree& et,
		const sequenceContainer& sc,
		const computePijGam& pi,
		const stochasticProcess& sp);
	// used to fill the likelihood for the unobservable for each category
	doubleRep getLofPos(const int pos,
		const tree& et,
		const sequenceContainer& sc,
		const computePijGam& pi,
		const stochasticProcess& sp,
		Vdouble& likePerCat);	// all the likdelhoodsPerCat and rateProb are filled




// --------------------------------------------------------------------------------
// this function should be used only when the branch lengths are not the same for
// all positions. Otherwise, computePijHom should be calculated once,
// and be used for all calls. In this function, computePijHom is being computed for
// each position.
doubleRep getLofPosHomModelEachSiteDifferentRate(const int pos,			
					  const tree& et,					
					  const sequenceContainer& sc,		
					  const stochasticProcess& sp);
// ---------------------------------------------------------------------------------


// --------------------------------------------------------------------------------
// this function should be used only when the branch lengths are not the same for
// all positions. Otherwise, computePijHom should be calculated once,
// and be used for all calls. In this function, computePijHom is being computed for
// each position.
doubleRep getLofPosGamModelEachSiteDifferentRate(const int pos,
					  const tree& et,
					  const sequenceContainer& sc,
					  const stochasticProcess& sp);
// --------------------------------------------------------------------------------


	doubleRep getLofPos(const int pos,					// with a site specific rate.
					  const tree& et,
					  const sequenceContainer& sc,
					  const stochasticProcess& sp,
					  const MDOUBLE gRate);
	doubleRep getProbOfPosWhenUpIsFilledHom(const int pos,	// to be used for homogenous model
					  const tree& et,
					  const sequenceContainer& sc,
					  const stochasticProcess& sp,
					  const suffStatGlobalHomPos& ssc);
	doubleRep getProbOfPosWhenUpIsFilledGam(const int pos, // to be used for Gamma model.
						const tree& et,
						const sequenceContainer& sc,
						const stochasticProcess& sp,
						const suffStatGlobalGamPos& cup);

  doubleRep getLofPosAndPosteriorOfRates(const int pos,
						const tree& et,
						const sequenceContainer& sc,
						const computePijGam& pi,
						const stochasticProcess& sp,
						VdoubleRep& postrior);

	MDOUBLE getTreeLikelihoodFromUp(const tree& et,
						const sequenceContainer& sc,
						const stochasticProcess& sp,
						const suffStatGlobalGam& cup,
						const Vdouble * weights =0 );
	
	MDOUBLE getTreeLikelihoodFromUp2(const tree& et,
						const sequenceContainer& sc,
						const stochasticProcess& sp,
						const suffStatGlobalGam& cup,
						VdoubleRep& posLike, // fill this vector with each position likelihood but without the weights.
						const Vdouble * weights=0,
						unObservableData* unObservableData_p=NULL);
	//old
	MDOUBLE getTreeLikelihoodFromUp2(const tree& et,
						const sequenceContainer& sc,
						stochasticProcess& sp,
						const suffStatGlobalGamProportional& cup,
						const gammaDistribution* pProportionDist,
						VdoubleRep& posLike, // fill this vector with each position likelihood but without the weights.
						const Vdouble * weights=0);
	//new
	MDOUBLE getTreeLikelihoodFromUp2(const tree& et,
						const sequenceContainer& sc,
						stochasticProcess& sp,
						const suffStatGlobalGamProportional& cup,
						const gammaDistribution* pProportionDist,
						VVdoubleRep& posLike, // fill this vector with each position likelihood but without the weights.
						const Vdouble * weights=0);

	// fill this vector with each position posterior rate (p(r|D))
	// but without the weights.
	// the weights are used only because we return the likelihood 
	// (this takes these weights into account).
	MDOUBLE getPosteriorOfRates(const tree& et,
						const sequenceContainer& sc,
						const stochasticProcess& sp,
						const suffStatGlobalGam& cup,
						VVdoubleRep& posteriorLike, 
						const Vdouble * weights = NULL);

	MDOUBLE getPosteriorOfRates(const tree& et,
						const sequenceContainer& sc,
						const stochasticProcess& sp,
						VVdoubleRep& posteriorLike, 
						const Vdouble * weights = NULL);

  // fill the posteriorLike matrix with each position posterior rate (p(r|D))
  // and the LLPP,  but without the weights.
  MDOUBLE getPosteriorOfRatesAndLLPP(const tree& et,
						const sequenceContainer& sc,
						const stochasticProcess& sp,
						const suffStatGlobalGam& cup,
						VVdoubleRep& posteriorLike, 
						VdoubleRep& LLPerPos, 
						const Vdouble * weights=NULL);
	// From Itay M.
	// this function forces non gamma computation of likelihoods from up.
	// i.e., even if the stochastic process is really gamma - the likelihood is computed as if there's no gamma.
	MDOUBLE getTreeLikelihoodFromUpSpecifcRates(const tree& et,
						const sequenceContainer& sc,
						const stochasticProcess& sp,
						const suffStatGlobalHom& cup,
						VdoubleRep& posLike, // fill this vector with each position likelihood but without the weights.
						const Vdouble * weights = NULL);

	// added from main semphy on 23.5.2005 (eyal privman + matan ninio).
	MDOUBLE computeLikelihoodAndLikelihoodPerPosition(const sequenceContainer &sc, const tree &et, 
												  const stochasticProcess &sp, Vdouble &LLPerPos);
    MDOUBLE getTreeLikelihoodFromPosteriorAndAlpha(const MDOUBLE alpha,
						const Vdouble originalBounderi,
						const VVdouble& posteriorLike,
						const VdoubleRep& LLPP,
						const Vdouble* weights);
    


};



#endif