40 #include "../FrequenciesSet/ProteinFrequenciesSet.h" 42 #include <Bpp/Numeric/Prob/SimpleDiscreteDistribution.h> 56 vector<SubstitutionModel*> vpSM;
57 for(
unsigned int i = 1; i < nbCat + 1; i++)
60 Vdouble vrate, vproba;
62 for (
size_t i = 0; i < vpSM.size(); i++)
64 vproba.push_back((dynamic_cast<LGL08_CAT::EmbeddedModel*>(vpSM[i]))->getProportion());
65 vrate.push_back(vpSM[i]->
getRate());
71 ParameterList pl =
pmixmodel_->getParameters();
72 for (
unsigned int i = 0; i < pl.size(); i++)
74 name = pl[i].getName();
76 st =
pmixmodel_->getParameterNameWithoutNamespace(name);
78 addParameter_(
new Parameter(
"LGL08_CAT." + st,
80 pmixmodel_->getParameter(st).hasConstraint() ?
pmixmodel_->getParameter(st).getConstraint()->clone() : 0,
true));
104 AbstractParameterAliasable(name),
110 for(
unsigned int i = 0; i < 20; i++)
112 for(
unsigned int j = 0; j < 20; j++)
124 #include "__CATC10FrequenciesCode" 125 #include "__CATC10RatesProps" 129 #include "__CATC20FrequenciesCode" 130 #include "__CATC20RatesProps" 134 #include "__CATC30FrequenciesCode" 135 #include "__CATC30RatesProps" 139 #include "__CATC40FrequenciesCode" 140 #include "__CATC40RatesProps" 144 #include "__CATC50FrequenciesCode" 145 #include "__CATC50RatesProps" 149 #include "__CATC60FrequenciesCode" 150 #include "__CATC60RatesProps" 153 throw Exception(
"LGL08_CAT.cpp: incorrect number of profiles. This number has to be 10, 20, 30, 40, 50 or 60.");
std::map< std::string, std::string > mapParNamesFromPmodel_
Tools to make the link between the Parameters of the object and those of pmixmodel_.
RowMatrix< double > exchangeability_
The exchangeability matrix of the model, defined as . When the model is reversible, this matrix is symetric.
ParameterList lParPmodel_
Abstract class for mixture models based on the bibliography.
This class implements a state map where all resolved states are modeled.
virtual void updateMatrices()
LGL08_CAT(const ProteicAlphabet *alpha, unsigned int nbCat=10)
Build a CAT model, with original equilibrium frequencies, probabilities and rates.
std::auto_ptr< MixtureOfSubstitutionModels > pmixmodel_
The Le et al (2008) CAT substitution model for proteins.
virtual void updateMatrices()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
Partial implementation of the ReversibleSubstitutionModel interface.
AbstractBiblioMixedSubstitutionModel & operator=(const AbstractBiblioMixedSubstitutionModel &model)
EmbeddedModel(const ProteicAlphabet *alpha, string name, unsigned int nbCat=10)
double getRate() const
Get the rate.
LGL08_CAT & operator=(const LGL08_CAT &)
Substitution models defined as a mixture of several substitution models.