36 for (
unsigned c=0; c<64; c++){
37 if (GeneticCode::translate(c) ==
'*')
44 for (
int c=0; c<64; c++)
48 void setKappa(
double kappa){ this->kappa = kappa;}
49 void setPi(
double *pi);
55 void setOmegas(
int k);
56 void setPrior(
double sigma = 0.2);
57 double getPrior(
int u){
return omegaPrior[u];}
58 vector<double> *getOmegas(){
return &omegas;}
59 double getOmega(
int u){
return omegas[u];}
60 int getK(){
return k;}
62 void setAAPostProbs();
63 void getRateMatrices();
64 void writeRateMatrices(
string filename);
65 void readRateMatrices(
string filename);
66 void computeLogPmatrices();
73 gsl_matrix *getSubMatrixLogP(
double omega,
double t);
80 double subLogProb(
int from,
int to,
double omega,
double t){
81 gsl_matrix *P = getSubMatrixLogP(omega, t);
82 return gsl_matrix_get(P, from, to);
88 double logLik(
const char *e1,
const char *e2,
int u,
double t);
92 double estOmegaOnSeqPair(
const char *e1,
const char *e2,
double t,
93 int& numAliCodons,
int &numSynSubst,
int &numNonSynSubst);
98 double estOmegaOnSeqTuple(vector<string> &seqtuple,
PhyloTree *tree,
102 vector<double> loglikForCodonTuple(vector<string> &seqtuple,
PhyloTree *ctree){
104 return loglikForCodonTuple(seqtuple, ctree, NULL, i);
106 vector<double> loglikForCodonTuple(vector<string> &seqtuple,
PhyloTree *ctree,
PhyloTree *tree,
int &subs);
108 double graphOmegaOnCodonAli(vector<string> &seqtuple,
PhyloTree *tree,
int refSpeciesIdx = 0);
113 void addBranchLength(
double b){}
118 vector<double> omegas;
119 vector<double> omegaPrior;
120 vector<double> aaUsage;
121 vector<vector<double> > aaPostProb;